159 references to AnnotationXmlConstants
PresentationFramework (159)
MS\Internal\Annotations\Anchoring\DataIdProcessor.cs (1)
457
private static readonly XmlQualifiedName DataIdElementName = new XmlQualifiedName("DataId",
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
MS\Internal\Annotations\Anchoring\FixedPageProcessor.cs (1)
348
private static readonly XmlQualifiedName PageNumberElementName = new XmlQualifiedName("PageNumber",
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (1)
627
private static readonly XmlQualifiedName FixedTextElementName = new XmlQualifiedName("FixedTextRange",
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (1)
423
internal static readonly XmlQualifiedName CharacterRangeElementName = new XmlQualifiedName("CharacterRange",
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
MS\Internal\Annotations\Component\HighlightComponent.cs (2)
492
(content.NamespaceURI ==
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace))
659
private static readonly XmlQualifiedName _name = new XmlQualifiedName("Highlight",
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
MS\Internal\Controls\StickyNote\StickyNoteAnnotations.cs (10)
489
root = xmlDoc.CreateElement(GetXmlName(token),
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
499
root = xmlDoc.CreateElement(GetXmlName(token),
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
516
XmlNode oldValue = root.GetAttributeNode(name,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
522
root.SetAttribute(name,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace, value);
527
root.RemoveAttribute(name,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
529
root.SetAttribute(name,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace, value);
560
s_xmlTokeFullNames.Add(token, $"{
AnnotationXmlConstants
.Prefixes.BaseSchemaPrefix}:{xmlName}");
704
return root.GetAttributeNode(GetXmlName(token),
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
1165
public static readonly XmlQualifiedName TextSchemaName = new XmlQualifiedName("TextStickyNote",
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
1170
public static readonly XmlQualifiedName InkSchemaName = new XmlQualifiedName("InkStickyNote",
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
System\Windows\Annotations\Annotation.cs (55)
60
[XmlRoot(Namespace =
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace, ElementName =
AnnotationXmlConstants
.Elements.Annotation)]
193
if (String.IsNullOrEmpty(writer.LookupPrefix(
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace)))
195
writer.WriteAttributeString(
AnnotationXmlConstants
.Prefixes.XmlnsPrefix,
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix, null,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
197
if (String.IsNullOrEmpty(writer.LookupPrefix(
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace)))
199
writer.WriteAttributeString(
AnnotationXmlConstants
.Prefixes.XmlnsPrefix,
AnnotationXmlConstants
.Prefixes.BaseSchemaPrefix, null,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
210
writer.WriteAttributeString(
AnnotationXmlConstants
.Attributes.Id, XmlConvert.ToString(_id));
211
writer.WriteAttributeString(
AnnotationXmlConstants
.Attributes.CreationTime, XmlConvert.ToString(_created));
212
writer.WriteAttributeString(
AnnotationXmlConstants
.Attributes.LastModificationTime, XmlConvert.ToString(_modified));
216
writer.WriteStartAttribute(
AnnotationXmlConstants
.Attributes.TypeName);
222
writer.WriteStartElement(
AnnotationXmlConstants
.Elements.AuthorCollection,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
227
writer.WriteElementString(
AnnotationXmlConstants
.Prefixes.BaseSchemaPrefix,
AnnotationXmlConstants
.Elements.StringAuthor,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace, author);
235
writer.WriteStartElement(
AnnotationXmlConstants
.Elements.AnchorCollection,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
248
writer.WriteStartElement(
AnnotationXmlConstants
.Elements.CargoCollection,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
290
while (!(XmlNodeType.EndElement == reader.NodeType &&
AnnotationXmlConstants
.Elements.Annotation == reader.LocalName))
292
if (
AnnotationXmlConstants
.Elements.AnchorCollection == reader.LocalName)
294
CheckForNonNamespaceAttribute(reader,
AnnotationXmlConstants
.Elements.AnchorCollection);
299
while (!(
AnnotationXmlConstants
.Elements.AnchorCollection == reader.LocalName && XmlNodeType.EndElement == reader.NodeType))
307
else if (
AnnotationXmlConstants
.Elements.CargoCollection == reader.LocalName)
309
CheckForNonNamespaceAttribute(reader,
AnnotationXmlConstants
.Elements.CargoCollection);
314
while (!(
AnnotationXmlConstants
.Elements.CargoCollection == reader.LocalName && XmlNodeType.EndElement == reader.NodeType))
322
else if (
AnnotationXmlConstants
.Elements.AuthorCollection == reader.LocalName)
324
CheckForNonNamespaceAttribute(reader,
AnnotationXmlConstants
.Elements.AuthorCollection);
329
while (!(
AnnotationXmlConstants
.Elements.AuthorCollection == reader.LocalName && XmlNodeType.EndElement == reader.NodeType))
331
if (!(
AnnotationXmlConstants
.Elements.StringAuthor == reader.LocalName && XmlNodeType.Element == reader.NodeType))
333
throw new XmlException(SR.Format(SR.InvalidXmlContent,
AnnotationXmlConstants
.Elements.Annotation));
348
throw new XmlException(SR.Format(SR.InvalidXmlContent,
AnnotationXmlConstants
.Elements.Annotation));
527
if (reader.LocalName ==
AnnotationXmlConstants
.Prefixes.XmlnsPrefix)
532
if (reader.Prefix ==
AnnotationXmlConstants
.Prefixes.XmlnsPrefix ||
533
reader.Prefix ==
AnnotationXmlConstants
.Prefixes.XmlPrefix)
619
case
AnnotationXmlConstants
.Attributes.Id:
626
case
AnnotationXmlConstants
.Attributes.CreationTime:
630
case
AnnotationXmlConstants
.Attributes.LastModificationTime:
636
case
AnnotationXmlConstants
.Attributes.TypeName:
644
throw new FormatException(SR.Format(SR.InvalidAttributeValue,
AnnotationXmlConstants
.Attributes.TypeName));
655
throw new FormatException(SR.Format(SR.InvalidAttributeValue,
AnnotationXmlConstants
.Attributes.TypeName));
662
throw new FormatException(SR.Format(SR.InvalidAttributeValue,
AnnotationXmlConstants
.Attributes.TypeName));
668
throw new XmlException(SR.Format(SR.UnexpectedAttribute, reader.LocalName,
AnnotationXmlConstants
.Elements.Annotation));
676
throw new XmlException(SR.Format(SR.RequiredAttributeMissing,
AnnotationXmlConstants
.Attributes.Id,
AnnotationXmlConstants
.Elements.Annotation));
680
throw new XmlException(SR.Format(SR.RequiredAttributeMissing,
AnnotationXmlConstants
.Attributes.CreationTime,
AnnotationXmlConstants
.Elements.Annotation));
684
throw new XmlException(SR.Format(SR.RequiredAttributeMissing,
AnnotationXmlConstants
.Attributes.LastModificationTime,
AnnotationXmlConstants
.Elements.Annotation));
688
throw new XmlException(SR.Format(SR.RequiredAttributeMissing,
AnnotationXmlConstants
.Attributes.TypeName,
AnnotationXmlConstants
.Elements.Annotation));
System\Windows\Annotations\AnnotationHelper.cs (1)
1040
XmlElement colorsElement = doc.CreateElement(HighlightComponent.ColorsContentName,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
System\Windows\Annotations\AnnotationResource.cs (17)
38
[XmlRoot(Namespace =
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace, ElementName =
AnnotationXmlConstants
.Elements.Resource)]
119
if (String.IsNullOrEmpty(writer.LookupPrefix(
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace)))
121
writer.WriteAttributeString(
AnnotationXmlConstants
.Prefixes.XmlnsPrefix,
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix, null,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
124
writer.WriteAttributeString(
AnnotationXmlConstants
.Attributes.Id, XmlConvert.ToString(_id));
127
writer.WriteAttributeString(
AnnotationXmlConstants
.Attributes.ResourceName, _name);
179
while (!(
AnnotationXmlConstants
.Elements.Resource == reader.LocalName && XmlNodeType.EndElement == reader.NodeType))
181
if (
AnnotationXmlConstants
.Elements.ContentLocatorGroup == reader.LocalName)
186
else if (
AnnotationXmlConstants
.Elements.ContentLocator == reader.LocalName)
200
throw new XmlException(SR.Format(SR.InvalidXmlContent,
AnnotationXmlConstants
.Elements.Resource));
455
case
AnnotationXmlConstants
.Attributes.Id:
459
case
AnnotationXmlConstants
.Attributes.ResourceName:
465
throw new XmlException(SR.Format(SR.UnexpectedAttribute, reader.LocalName,
AnnotationXmlConstants
.Elements.Resource));
472
throw new XmlException(SR.Format(SR.RequiredAttributeMissing,
AnnotationXmlConstants
.Attributes.Id,
AnnotationXmlConstants
.Elements.Resource));
System\Windows\Annotations\LocatorGroup.cs (10)
36
[XmlRoot(Namespace =
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace, ElementName =
AnnotationXmlConstants
.Elements.ContentLocatorGroup)]
105
string prefix = writer.LookupPrefix(
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
108
writer.WriteAttributeString(
AnnotationXmlConstants
.Prefixes.XmlnsPrefix,
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix, null,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
133
Annotation.CheckForNonNamespaceAttribute(reader,
AnnotationXmlConstants
.Elements.ContentLocatorGroup);
140
while (!(
AnnotationXmlConstants
.Elements.ContentLocatorGroup == reader.LocalName && XmlNodeType.EndElement == reader.NodeType))
143
if (
AnnotationXmlConstants
.Elements.ContentLocator == reader.LocalName)
152
throw new XmlException(SR.Format(SR.InvalidXmlContent,
AnnotationXmlConstants
.Elements.ContentLocatorGroup));
System\Windows\Annotations\LocatorPart.cs (12)
365
string corePrefix = namespaceManager.LookupPrefix(
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
368
res += $"{TextSelectionProcessor.CharacterRangeElementName.Name}/{corePrefix}:{
AnnotationXmlConstants
.Elements.Item}";
379
res += $"[starts-with(@{
AnnotationXmlConstants
.Attributes.ItemName}, \"{TextSelectionProcessor.SegmentAttribute}\") and ((substring-before(@{
AnnotationXmlConstants
.Attributes.ItemValue},\",\") >= {startStr} and substring-before(@{
AnnotationXmlConstants
.Attributes.ItemValue},\",\") <= {endStr}) or (substring-before(@{
AnnotationXmlConstants
.Attributes.ItemValue},\",\") < {startStr} and substring-after(@{
AnnotationXmlConstants
.Attributes.ItemValue},\",\") >= {startStr}))]";
392
string corePrefix = namespaceManager.LookupPrefix(
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
403
res += $"/parent::*/{corePrefix}:{
AnnotationXmlConstants
.Elements.Item}[";
408
res += $"/{corePrefix}:{
AnnotationXmlConstants
.Elements.Item}[";
410
res += $"@{
AnnotationXmlConstants
.Attributes.ItemName}=\"{k_v.Key}\" and @{
AnnotationXmlConstants
.Attributes.ItemValue}=\"{k_v.Value}\"]";
System\Windows\Annotations\LocatorPartList.cs (28)
41
[XmlRoot(Namespace =
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace, ElementName =
AnnotationXmlConstants
.Elements.ContentLocator)]
163
string prefix = writer.LookupPrefix(
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
166
writer.WriteAttributeString(
AnnotationXmlConstants
.Prefixes.XmlnsPrefix,
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix, null,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
168
prefix = writer.LookupPrefix(
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
171
writer.WriteAttributeString(
AnnotationXmlConstants
.Prefixes.XmlnsPrefix,
AnnotationXmlConstants
.Prefixes.BaseSchemaPrefix, null,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
192
writer.WriteStartElement(
AnnotationXmlConstants
.Elements.Item,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
193
writer.WriteAttributeString(
AnnotationXmlConstants
.Attributes.ItemName, pair.Key);
194
writer.WriteAttributeString(
AnnotationXmlConstants
.Attributes.ItemValue, pair.Value);
216
Annotation.CheckForNonNamespaceAttribute(reader,
AnnotationXmlConstants
.Elements.ContentLocator);
225
while (!(
AnnotationXmlConstants
.Elements.ContentLocator == reader.LocalName && XmlNodeType.EndElement == reader.NodeType))
229
throw new XmlException(SR.Format(SR.InvalidXmlContent,
AnnotationXmlConstants
.Elements.ContentLocator));
245
if (
AnnotationXmlConstants
.Elements.Item == reader.LocalName && reader.NamespaceURI ==
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace)
254
case
AnnotationXmlConstants
.Attributes.ItemName:
257
case
AnnotationXmlConstants
.Attributes.ItemValue:
262
throw new XmlException(SR.Format(SR.UnexpectedAttribute, reader.LocalName,
AnnotationXmlConstants
.Elements.Item));
269
throw new XmlException(SR.Format(SR.RequiredAttributeMissing,
AnnotationXmlConstants
.Attributes.ItemName,
AnnotationXmlConstants
.Elements.Item));
273
throw new XmlException(SR.Format(SR.RequiredAttributeMissing,
AnnotationXmlConstants
.Attributes.ItemValue,
AnnotationXmlConstants
.Elements.Item));
286
if (!(XmlNodeType.EndElement == reader.NodeType &&
AnnotationXmlConstants
.Elements.Item == reader.LocalName))
289
throw new XmlException(SR.Format(SR.InvalidXmlContent,
AnnotationXmlConstants
.Elements.Item));
System\Windows\Annotations\Storage\XmlStreamStore.cs (20)
60
_predefinedNamespaces.Add(new Uri(
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace), null);
61
_predefinedNamespaces.Add(new Uri(
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace), null);
251
string query = $@"//{
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix}:{
AnnotationXmlConstants
.Elements.ContentLocator}";
279
query += $@"/ancestor::{
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix}:Anchors/ancestor::{
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix}:Annotation";
304
string query = $"//{
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix}:Annotation";
578
throw new XmlException(SR.Format(SR.RequiredAttributeMissing,
AnnotationXmlConstants
.Attributes.Id,
AnnotationXmlConstants
.Elements.Annotation));
743
$"<?xml version=\"1.0\" encoding=\"utf-8\"?> <{
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix}:Annotations xmlns:{
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix}=\"{
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace}\" xmlns:{
AnnotationXmlConstants
.Prefixes.BaseSchemaPrefix}=\"{
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace}\" />");
752
_namespaceManager.AddNamespace(
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
753
_namespaceManager.AddNamespace(
AnnotationXmlConstants
.Prefixes.BaseSchemaPrefix,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
760
XPathNodeIterator iterator = navigator.Select($"//{
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix}:Annotations", _namespaceManager);
922
XPathNodeIterator iterator = tempNavigator.Select($@"//{
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix}:Annotation[@Id=""{XmlConvert.ToString(id)}""]", _namespaceManager);