159 references to AnnotationXmlConstants
PresentationFramework (159)
MS\Internal\Annotations\Anchoring\DataIdProcessor.cs (1)
434
private static readonly XmlQualifiedName DataIdElementName = new XmlQualifiedName("DataId",
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
MS\Internal\Annotations\Anchoring\FixedPageProcessor.cs (1)
340
private static readonly XmlQualifiedName PageNumberElementName = new XmlQualifiedName("PageNumber",
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (1)
618
private static readonly XmlQualifiedName FixedTextElementName = new XmlQualifiedName("FixedTextRange",
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (1)
412
internal static readonly XmlQualifiedName CharacterRangeElementName = new XmlQualifiedName("CharacterRange",
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
MS\Internal\Annotations\Component\HighlightComponent.cs (2)
483
(content.NamespaceURI ==
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace))
650
private static readonly XmlQualifiedName _name = new XmlQualifiedName("Highlight",
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
MS\Internal\Controls\StickyNote\StickyNoteAnnotations.cs (10)
478
root = xmlDoc.CreateElement(GetXmlName(token),
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
488
root = xmlDoc.CreateElement(GetXmlName(token),
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
505
XmlNode oldValue = root.GetAttributeNode(name,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
511
root.SetAttribute(name,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace, value);
516
root.RemoveAttribute(name,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
518
root.SetAttribute(name,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace, value);
549
s_xmlTokeFullNames.Add(token, $"{
AnnotationXmlConstants
.Prefixes.BaseSchemaPrefix}:{xmlName}");
693
return root.GetAttributeNode(GetXmlName(token),
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
1153
public static readonly XmlQualifiedName TextSchemaName = new XmlQualifiedName("TextStickyNote",
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
1158
public static readonly XmlQualifiedName InkSchemaName = new XmlQualifiedName("InkStickyNote",
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
System\Windows\Annotations\Annotation.cs (55)
52
[XmlRoot(Namespace =
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace, ElementName =
AnnotationXmlConstants
.Elements.Annotation)]
185
if (String.IsNullOrEmpty(writer.LookupPrefix(
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace)))
187
writer.WriteAttributeString(
AnnotationXmlConstants
.Prefixes.XmlnsPrefix,
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix, null,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
189
if (String.IsNullOrEmpty(writer.LookupPrefix(
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace)))
191
writer.WriteAttributeString(
AnnotationXmlConstants
.Prefixes.XmlnsPrefix,
AnnotationXmlConstants
.Prefixes.BaseSchemaPrefix, null,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
202
writer.WriteAttributeString(
AnnotationXmlConstants
.Attributes.Id, XmlConvert.ToString(_id));
203
writer.WriteAttributeString(
AnnotationXmlConstants
.Attributes.CreationTime, XmlConvert.ToString(_created));
204
writer.WriteAttributeString(
AnnotationXmlConstants
.Attributes.LastModificationTime, XmlConvert.ToString(_modified));
208
writer.WriteStartAttribute(
AnnotationXmlConstants
.Attributes.TypeName);
214
writer.WriteStartElement(
AnnotationXmlConstants
.Elements.AuthorCollection,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
219
writer.WriteElementString(
AnnotationXmlConstants
.Prefixes.BaseSchemaPrefix,
AnnotationXmlConstants
.Elements.StringAuthor,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace, author);
227
writer.WriteStartElement(
AnnotationXmlConstants
.Elements.AnchorCollection,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
240
writer.WriteStartElement(
AnnotationXmlConstants
.Elements.CargoCollection,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
282
while (!(XmlNodeType.EndElement == reader.NodeType &&
AnnotationXmlConstants
.Elements.Annotation == reader.LocalName))
284
if (
AnnotationXmlConstants
.Elements.AnchorCollection == reader.LocalName)
286
CheckForNonNamespaceAttribute(reader,
AnnotationXmlConstants
.Elements.AnchorCollection);
291
while (!(
AnnotationXmlConstants
.Elements.AnchorCollection == reader.LocalName && XmlNodeType.EndElement == reader.NodeType))
299
else if (
AnnotationXmlConstants
.Elements.CargoCollection == reader.LocalName)
301
CheckForNonNamespaceAttribute(reader,
AnnotationXmlConstants
.Elements.CargoCollection);
306
while (!(
AnnotationXmlConstants
.Elements.CargoCollection == reader.LocalName && XmlNodeType.EndElement == reader.NodeType))
314
else if (
AnnotationXmlConstants
.Elements.AuthorCollection == reader.LocalName)
316
CheckForNonNamespaceAttribute(reader,
AnnotationXmlConstants
.Elements.AuthorCollection);
321
while (!(
AnnotationXmlConstants
.Elements.AuthorCollection == reader.LocalName && XmlNodeType.EndElement == reader.NodeType))
323
if (!(
AnnotationXmlConstants
.Elements.StringAuthor == reader.LocalName && XmlNodeType.Element == reader.NodeType))
325
throw new XmlException(SR.Format(SR.InvalidXmlContent,
AnnotationXmlConstants
.Elements.Annotation));
340
throw new XmlException(SR.Format(SR.InvalidXmlContent,
AnnotationXmlConstants
.Elements.Annotation));
519
if (reader.LocalName ==
AnnotationXmlConstants
.Prefixes.XmlnsPrefix)
524
if (reader.Prefix ==
AnnotationXmlConstants
.Prefixes.XmlnsPrefix ||
525
reader.Prefix ==
AnnotationXmlConstants
.Prefixes.XmlPrefix)
613
case
AnnotationXmlConstants
.Attributes.Id:
620
case
AnnotationXmlConstants
.Attributes.CreationTime:
624
case
AnnotationXmlConstants
.Attributes.LastModificationTime:
630
case
AnnotationXmlConstants
.Attributes.TypeName:
640
throw new FormatException(SR.Format(SR.InvalidAttributeValue,
AnnotationXmlConstants
.Attributes.TypeName));
651
throw new FormatException(SR.Format(SR.InvalidAttributeValue,
AnnotationXmlConstants
.Attributes.TypeName));
658
throw new FormatException(SR.Format(SR.InvalidAttributeValue,
AnnotationXmlConstants
.Attributes.TypeName));
664
throw new XmlException(SR.Format(SR.UnexpectedAttribute, reader.LocalName,
AnnotationXmlConstants
.Elements.Annotation));
672
throw new XmlException(SR.Format(SR.RequiredAttributeMissing,
AnnotationXmlConstants
.Attributes.Id,
AnnotationXmlConstants
.Elements.Annotation));
676
throw new XmlException(SR.Format(SR.RequiredAttributeMissing,
AnnotationXmlConstants
.Attributes.CreationTime,
AnnotationXmlConstants
.Elements.Annotation));
680
throw new XmlException(SR.Format(SR.RequiredAttributeMissing,
AnnotationXmlConstants
.Attributes.LastModificationTime,
AnnotationXmlConstants
.Elements.Annotation));
684
throw new XmlException(SR.Format(SR.RequiredAttributeMissing,
AnnotationXmlConstants
.Attributes.TypeName,
AnnotationXmlConstants
.Elements.Annotation));
System\Windows\Annotations\AnnotationHelper.cs (1)
1025
XmlElement colorsElement = doc.CreateElement(HighlightComponent.ColorsContentName,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
System\Windows\Annotations\AnnotationResource.cs (17)
31
[XmlRoot(Namespace =
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace, ElementName =
AnnotationXmlConstants
.Elements.Resource)]
112
if (String.IsNullOrEmpty(writer.LookupPrefix(
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace)))
114
writer.WriteAttributeString(
AnnotationXmlConstants
.Prefixes.XmlnsPrefix,
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix, null,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
117
writer.WriteAttributeString(
AnnotationXmlConstants
.Attributes.Id, XmlConvert.ToString(_id));
120
writer.WriteAttributeString(
AnnotationXmlConstants
.Attributes.ResourceName, _name);
169
while (!(
AnnotationXmlConstants
.Elements.Resource == reader.LocalName && XmlNodeType.EndElement == reader.NodeType))
171
if (
AnnotationXmlConstants
.Elements.ContentLocatorGroup == reader.LocalName)
176
else if (
AnnotationXmlConstants
.Elements.ContentLocator == reader.LocalName)
190
throw new XmlException(SR.Format(SR.InvalidXmlContent,
AnnotationXmlConstants
.Elements.Resource));
445
case
AnnotationXmlConstants
.Attributes.Id:
449
case
AnnotationXmlConstants
.Attributes.ResourceName:
455
throw new XmlException(SR.Format(SR.UnexpectedAttribute, reader.LocalName,
AnnotationXmlConstants
.Elements.Resource));
462
throw new XmlException(SR.Format(SR.RequiredAttributeMissing,
AnnotationXmlConstants
.Attributes.Id,
AnnotationXmlConstants
.Elements.Resource));
System\Windows\Annotations\LocatorGroup.cs (10)
29
[XmlRoot(Namespace =
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace, ElementName =
AnnotationXmlConstants
.Elements.ContentLocatorGroup)]
98
string prefix = writer.LookupPrefix(
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
101
writer.WriteAttributeString(
AnnotationXmlConstants
.Prefixes.XmlnsPrefix,
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix, null,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
126
Annotation.CheckForNonNamespaceAttribute(reader,
AnnotationXmlConstants
.Elements.ContentLocatorGroup);
133
while (!(
AnnotationXmlConstants
.Elements.ContentLocatorGroup == reader.LocalName && XmlNodeType.EndElement == reader.NodeType))
136
if (
AnnotationXmlConstants
.Elements.ContentLocator == reader.LocalName)
145
throw new XmlException(SR.Format(SR.InvalidXmlContent,
AnnotationXmlConstants
.Elements.ContentLocatorGroup));
System\Windows\Annotations\LocatorPart.cs (12)
360
string corePrefix = namespaceManager.LookupPrefix(
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
363
res += $"{TextSelectionProcessor.CharacterRangeElementName.Name}/{corePrefix}:{
AnnotationXmlConstants
.Elements.Item}";
374
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}))]";
387
string corePrefix = namespaceManager.LookupPrefix(
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
398
res += $"/parent::*/{corePrefix}:{
AnnotationXmlConstants
.Elements.Item}[";
403
res += $"/{corePrefix}:{
AnnotationXmlConstants
.Elements.Item}[";
405
res += $"@{
AnnotationXmlConstants
.Attributes.ItemName}=\"{k_v.Key}\" and @{
AnnotationXmlConstants
.Attributes.ItemValue}=\"{k_v.Value}\"]";
System\Windows\Annotations\LocatorPartList.cs (28)
20
[XmlRoot(Namespace =
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace, ElementName =
AnnotationXmlConstants
.Elements.ContentLocator)]
141
string prefix = writer.LookupPrefix(
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
144
writer.WriteAttributeString(
AnnotationXmlConstants
.Prefixes.XmlnsPrefix,
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix, null,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
146
prefix = writer.LookupPrefix(
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
149
writer.WriteAttributeString(
AnnotationXmlConstants
.Prefixes.XmlnsPrefix,
AnnotationXmlConstants
.Prefixes.BaseSchemaPrefix, null,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
170
writer.WriteStartElement(
AnnotationXmlConstants
.Elements.Item,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
171
writer.WriteAttributeString(
AnnotationXmlConstants
.Attributes.ItemName, pair.Key);
172
writer.WriteAttributeString(
AnnotationXmlConstants
.Attributes.ItemValue, pair.Value);
194
Annotation.CheckForNonNamespaceAttribute(reader,
AnnotationXmlConstants
.Elements.ContentLocator);
203
while (!(
AnnotationXmlConstants
.Elements.ContentLocator == reader.LocalName && XmlNodeType.EndElement == reader.NodeType))
207
throw new XmlException(SR.Format(SR.InvalidXmlContent,
AnnotationXmlConstants
.Elements.ContentLocator));
223
if (
AnnotationXmlConstants
.Elements.Item == reader.LocalName && reader.NamespaceURI ==
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace)
232
case
AnnotationXmlConstants
.Attributes.ItemName:
235
case
AnnotationXmlConstants
.Attributes.ItemValue:
240
throw new XmlException(SR.Format(SR.UnexpectedAttribute, reader.LocalName,
AnnotationXmlConstants
.Elements.Item));
247
throw new XmlException(SR.Format(SR.RequiredAttributeMissing,
AnnotationXmlConstants
.Attributes.ItemName,
AnnotationXmlConstants
.Elements.Item));
251
throw new XmlException(SR.Format(SR.RequiredAttributeMissing,
AnnotationXmlConstants
.Attributes.ItemValue,
AnnotationXmlConstants
.Elements.Item));
264
if (!(XmlNodeType.EndElement == reader.NodeType &&
AnnotationXmlConstants
.Elements.Item == reader.LocalName))
267
throw new XmlException(SR.Format(SR.InvalidXmlContent,
AnnotationXmlConstants
.Elements.Item));
System\Windows\Annotations\Storage\XmlStreamStore.cs (20)
48
_predefinedNamespaces.Add(new Uri(
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace), null);
49
_predefinedNamespaces.Add(new Uri(
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace), null);
239
string query = $@"//{
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix}:{
AnnotationXmlConstants
.Elements.ContentLocator}";
267
query += $@"/ancestor::{
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix}:Anchors/ancestor::{
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix}:Annotation";
292
string query = $"//{
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix}:Annotation";
566
throw new XmlException(SR.Format(SR.RequiredAttributeMissing,
AnnotationXmlConstants
.Attributes.Id,
AnnotationXmlConstants
.Elements.Annotation));
733
$"<?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}\" />");
742
_namespaceManager.AddNamespace(
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix,
AnnotationXmlConstants
.Namespaces.CoreSchemaNamespace);
743
_namespaceManager.AddNamespace(
AnnotationXmlConstants
.Prefixes.BaseSchemaPrefix,
AnnotationXmlConstants
.Namespaces.BaseSchemaNamespace);
750
XPathNodeIterator iterator = navigator.Select($"//{
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix}:Annotations", _namespaceManager);
912
XPathNodeIterator iterator = tempNavigator.Select($@"//{
AnnotationXmlConstants
.Prefixes.CoreSchemaPrefix}:Annotation[@Id=""{XmlConvert.ToString(id)}""]", _namespaceManager);