159 references to AnnotationXmlConstants
PresentationFramework (159)
MS\Internal\Annotations\Anchoring\DataIdProcessor.cs (1)
435
private static readonly XmlQualifiedName DataIdElementName = new XmlQualifiedName("DataId",
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
MS\Internal\Annotations\Anchoring\FixedPageProcessor.cs (1)
341
private static readonly XmlQualifiedName PageNumberElementName = new XmlQualifiedName("PageNumber",
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (1)
616
private static readonly XmlQualifiedName FixedTextElementName = new XmlQualifiedName("FixedTextRange",
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (1)
413
internal static readonly XmlQualifiedName CharacterRangeElementName = new XmlQualifiedName("CharacterRange",
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
MS\Internal\Annotations\Component\HighlightComponent.cs (2)
484
(content.NamespaceURI ==
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace))
651
private static readonly XmlQualifiedName _name = new XmlQualifiedName("Highlight",
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
MS\Internal\Controls\StickyNote\StickyNoteAnnotations.cs (10)
479
root = xmlDoc.CreateElement(GetXmlName(token),
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
489
root = xmlDoc.CreateElement(GetXmlName(token),
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
506
XmlNode oldValue = root.GetAttributeNode(name,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
512
root.SetAttribute(name,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace, value);
517
root.RemoveAttribute(name,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
519
root.SetAttribute(name,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace, value);
550
s_xmlTokeFullNames.Add(token, $"{
AnnotationXmlConstants
.Prefixes.BaseSchemaPrefix}:{xmlName}");
694
return root.GetAttributeNode(GetXmlName(token),
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
1155
public static readonly XmlQualifiedName TextSchemaName = new XmlQualifiedName("TextStickyNote",
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
1160
public static readonly XmlQualifiedName InkSchemaName = new XmlQualifiedName("InkStickyNote",
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
System\Windows\Annotations\Annotation.cs (55)
53
[XmlRoot(Namespace =
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace, ElementName =
AnnotationXmlConstants
.Elements.Annotation)]
186
if (String.IsNullOrEmpty(writer.LookupPrefix(
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace)))
188
writer.WriteAttributeString(
AnnotationXmlConstants
.Prefixes.XmlnsPrefix,
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix, null,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
190
if (String.IsNullOrEmpty(writer.LookupPrefix(
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace)))
192
writer.WriteAttributeString(
AnnotationXmlConstants
.Prefixes.XmlnsPrefix,
AnnotationXmlConstants
.Prefixes.BaseSchemaPrefix, null,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
203
writer.WriteAttributeString(
AnnotationXmlConstants
.Attributes.Id, XmlConvert.ToString(_id));
204
writer.WriteAttributeString(
AnnotationXmlConstants
.Attributes.CreationTime, XmlConvert.ToString(_created));
205
writer.WriteAttributeString(
AnnotationXmlConstants
.Attributes.LastModificationTime, XmlConvert.ToString(_modified));
209
writer.WriteStartAttribute(
AnnotationXmlConstants
.Attributes.TypeName);
215
writer.WriteStartElement(
AnnotationXmlConstants
.Elements.AuthorCollection,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
220
writer.WriteElementString(
AnnotationXmlConstants
.Prefixes.BaseSchemaPrefix,
AnnotationXmlConstants
.Elements.StringAuthor,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace, author);
228
writer.WriteStartElement(
AnnotationXmlConstants
.Elements.AnchorCollection,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
241
writer.WriteStartElement(
AnnotationXmlConstants
.Elements.CargoCollection,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
283
while (!(XmlNodeType.EndElement == reader.NodeType &&
AnnotationXmlConstants
.Elements.Annotation == reader.LocalName))
285
if (
AnnotationXmlConstants
.Elements.AnchorCollection == reader.LocalName)
287
CheckForNonNamespaceAttribute(reader,
AnnotationXmlConstants
.Elements.AnchorCollection);
292
while (!(
AnnotationXmlConstants
.Elements.AnchorCollection == reader.LocalName && XmlNodeType.EndElement == reader.NodeType))
300
else if (
AnnotationXmlConstants
.Elements.CargoCollection == reader.LocalName)
302
CheckForNonNamespaceAttribute(reader,
AnnotationXmlConstants
.Elements.CargoCollection);
307
while (!(
AnnotationXmlConstants
.Elements.CargoCollection == reader.LocalName && XmlNodeType.EndElement == reader.NodeType))
315
else if (
AnnotationXmlConstants
.Elements.AuthorCollection == reader.LocalName)
317
CheckForNonNamespaceAttribute(reader,
AnnotationXmlConstants
.Elements.AuthorCollection);
322
while (!(
AnnotationXmlConstants
.Elements.AuthorCollection == reader.LocalName && XmlNodeType.EndElement == reader.NodeType))
324
if (!(
AnnotationXmlConstants
.Elements.StringAuthor == reader.LocalName && XmlNodeType.Element == reader.NodeType))
326
throw new XmlException(SR.Format(SR.InvalidXmlContent,
AnnotationXmlConstants
.Elements.Annotation));
341
throw new XmlException(SR.Format(SR.InvalidXmlContent,
AnnotationXmlConstants
.Elements.Annotation));
520
if (reader.LocalName ==
AnnotationXmlConstants
.Prefixes.XmlnsPrefix)
525
if (reader.Prefix ==
AnnotationXmlConstants
.Prefixes.XmlnsPrefix ||
526
reader.Prefix ==
AnnotationXmlConstants
.Prefixes.XmlPrefix)
612
case
AnnotationXmlConstants
.Attributes.Id:
619
case
AnnotationXmlConstants
.Attributes.CreationTime:
623
case
AnnotationXmlConstants
.Attributes.LastModificationTime:
629
case
AnnotationXmlConstants
.Attributes.TypeName:
637
throw new FormatException(SR.Format(SR.InvalidAttributeValue,
AnnotationXmlConstants
.Attributes.TypeName));
648
throw new FormatException(SR.Format(SR.InvalidAttributeValue,
AnnotationXmlConstants
.Attributes.TypeName));
655
throw new FormatException(SR.Format(SR.InvalidAttributeValue,
AnnotationXmlConstants
.Attributes.TypeName));
661
throw new XmlException(SR.Format(SR.UnexpectedAttribute, reader.LocalName,
AnnotationXmlConstants
.Elements.Annotation));
669
throw new XmlException(SR.Format(SR.RequiredAttributeMissing,
AnnotationXmlConstants
.Attributes.Id,
AnnotationXmlConstants
.Elements.Annotation));
673
throw new XmlException(SR.Format(SR.RequiredAttributeMissing,
AnnotationXmlConstants
.Attributes.CreationTime,
AnnotationXmlConstants
.Elements.Annotation));
677
throw new XmlException(SR.Format(SR.RequiredAttributeMissing,
AnnotationXmlConstants
.Attributes.LastModificationTime,
AnnotationXmlConstants
.Elements.Annotation));
681
throw new XmlException(SR.Format(SR.RequiredAttributeMissing,
AnnotationXmlConstants
.Attributes.TypeName,
AnnotationXmlConstants
.Elements.Annotation));
System\Windows\Annotations\AnnotationHelper.cs (1)
1026
XmlElement colorsElement = doc.CreateElement(HighlightComponent.ColorsContentName,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
System\Windows\Annotations\AnnotationResource.cs (17)
32
[XmlRoot(Namespace =
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace, ElementName =
AnnotationXmlConstants
.Elements.Resource)]
113
if (String.IsNullOrEmpty(writer.LookupPrefix(
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace)))
115
writer.WriteAttributeString(
AnnotationXmlConstants
.Prefixes.XmlnsPrefix,
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix, null,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
118
writer.WriteAttributeString(
AnnotationXmlConstants
.Attributes.Id, XmlConvert.ToString(_id));
121
writer.WriteAttributeString(
AnnotationXmlConstants
.Attributes.ResourceName, _name);
173
while (!(
AnnotationXmlConstants
.Elements.Resource == reader.LocalName && XmlNodeType.EndElement == reader.NodeType))
175
if (
AnnotationXmlConstants
.Elements.ContentLocatorGroup == reader.LocalName)
180
else if (
AnnotationXmlConstants
.Elements.ContentLocator == reader.LocalName)
194
throw new XmlException(SR.Format(SR.InvalidXmlContent,
AnnotationXmlConstants
.Elements.Resource));
449
case
AnnotationXmlConstants
.Attributes.Id:
453
case
AnnotationXmlConstants
.Attributes.ResourceName:
459
throw new XmlException(SR.Format(SR.UnexpectedAttribute, reader.LocalName,
AnnotationXmlConstants
.Elements.Resource));
466
throw new XmlException(SR.Format(SR.RequiredAttributeMissing,
AnnotationXmlConstants
.Attributes.Id,
AnnotationXmlConstants
.Elements.Resource));
System\Windows\Annotations\LocatorGroup.cs (10)
30
[XmlRoot(Namespace =
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace, ElementName =
AnnotationXmlConstants
.Elements.ContentLocatorGroup)]
99
string prefix = writer.LookupPrefix(
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
102
writer.WriteAttributeString(
AnnotationXmlConstants
.Prefixes.XmlnsPrefix,
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix, null,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
127
Annotation.CheckForNonNamespaceAttribute(reader,
AnnotationXmlConstants
.Elements.ContentLocatorGroup);
134
while (!(
AnnotationXmlConstants
.Elements.ContentLocatorGroup == reader.LocalName && XmlNodeType.EndElement == reader.NodeType))
137
if (
AnnotationXmlConstants
.Elements.ContentLocator == reader.LocalName)
146
throw new XmlException(SR.Format(SR.InvalidXmlContent,
AnnotationXmlConstants
.Elements.ContentLocatorGroup));
System\Windows\Annotations\LocatorPart.cs (12)
361
string corePrefix = namespaceManager.LookupPrefix(
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
364
res += $"{TextSelectionProcessor.CharacterRangeElementName.Name}/{corePrefix}:{
AnnotationXmlConstants
.Elements.Item}";
375
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}))]";
388
string corePrefix = namespaceManager.LookupPrefix(
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
399
res += $"/parent::*/{corePrefix}:{
AnnotationXmlConstants
.Elements.Item}[";
404
res += $"/{corePrefix}:{
AnnotationXmlConstants
.Elements.Item}[";
406
res += $"@{
AnnotationXmlConstants
.Attributes.ItemName}=\"{k_v.Key}\" and @{
AnnotationXmlConstants
.Attributes.ItemValue}=\"{k_v.Value}\"]";
System\Windows\Annotations\LocatorPartList.cs (28)
21
[XmlRoot(Namespace =
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace, ElementName =
AnnotationXmlConstants
.Elements.ContentLocator)]
142
string prefix = writer.LookupPrefix(
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
145
writer.WriteAttributeString(
AnnotationXmlConstants
.Prefixes.XmlnsPrefix,
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix, null,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
147
prefix = writer.LookupPrefix(
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
150
writer.WriteAttributeString(
AnnotationXmlConstants
.Prefixes.XmlnsPrefix,
AnnotationXmlConstants
.Prefixes.BaseSchemaPrefix, null,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
171
writer.WriteStartElement(
AnnotationXmlConstants
.Elements.Item,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
172
writer.WriteAttributeString(
AnnotationXmlConstants
.Attributes.ItemName, pair.Key);
173
writer.WriteAttributeString(
AnnotationXmlConstants
.Attributes.ItemValue, pair.Value);
195
Annotation.CheckForNonNamespaceAttribute(reader,
AnnotationXmlConstants
.Elements.ContentLocator);
204
while (!(
AnnotationXmlConstants
.Elements.ContentLocator == reader.LocalName && XmlNodeType.EndElement == reader.NodeType))
208
throw new XmlException(SR.Format(SR.InvalidXmlContent,
AnnotationXmlConstants
.Elements.ContentLocator));
224
if (
AnnotationXmlConstants
.Elements.Item == reader.LocalName && reader.NamespaceURI ==
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace)
233
case
AnnotationXmlConstants
.Attributes.ItemName:
236
case
AnnotationXmlConstants
.Attributes.ItemValue:
241
throw new XmlException(SR.Format(SR.UnexpectedAttribute, reader.LocalName,
AnnotationXmlConstants
.Elements.Item));
248
throw new XmlException(SR.Format(SR.RequiredAttributeMissing,
AnnotationXmlConstants
.Attributes.ItemName,
AnnotationXmlConstants
.Elements.Item));
252
throw new XmlException(SR.Format(SR.RequiredAttributeMissing,
AnnotationXmlConstants
.Attributes.ItemValue,
AnnotationXmlConstants
.Elements.Item));
265
if (!(XmlNodeType.EndElement == reader.NodeType &&
AnnotationXmlConstants
.Elements.Item == reader.LocalName))
268
throw new XmlException(SR.Format(SR.InvalidXmlContent,
AnnotationXmlConstants
.Elements.Item));
System\Windows\Annotations\Storage\XmlStreamStore.cs (20)
49
_predefinedNamespaces.Add(new Uri(
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace), null);
50
_predefinedNamespaces.Add(new Uri(
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace), null);
240
string query = $@"//{
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix}:{
AnnotationXmlConstants
.Elements.ContentLocator}";
268
query += $@"/ancestor::{
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix}:Anchors/ancestor::{
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix}:Annotation";
293
string query = $"//{
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix}:Annotation";
567
throw new XmlException(SR.Format(SR.RequiredAttributeMissing,
AnnotationXmlConstants
.Attributes.Id,
AnnotationXmlConstants
.Elements.Annotation));
734
$"<?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}\" />");
743
_namespaceManager.AddNamespace(
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
744
_namespaceManager.AddNamespace(
AnnotationXmlConstants
.Prefixes.BaseSchemaPrefix,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
751
XPathNodeIterator iterator = navigator.Select($"//{
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix}:Annotations", _namespaceManager);
913
XPathNodeIterator iterator = tempNavigator.Select($@"//{
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix}:Annotation[@Id=""{XmlConvert.ToString(id)}""]", _namespaceManager);