Exemple #1
0
 public virtual void WriteQName(Qname n)
 {
     WriteText(n.Name);
 }
Exemple #2
0
 private void ProcessAttributeQName(Qname qname, out string prefix, out string localName, out string ns)
 {
     QNameParser.Split(qname.Name, out prefix, out localName);
     if (String.IsNullOrEmpty(prefix))
         ns = String.Empty;
     else
     {
         ns = _context.NamespaceManager.LookupNamespace(prefix);
         if (ns == null)
             throw new XQueryException(Properties.Resources.XPST0081, prefix);
     }
     prefix = _context.nameTable.Add(prefix);
     localName = _context.nameTable.Add(localName);
 }
Exemple #3
0
 private object ProcessQName(Notation notation, Qname qname, String defaultNS)
 {
     return QNameParser.Parse(qname.Name, _context.NamespaceManager, defaultNS, _context.nameTable);
 }
Exemple #4
0
 private XmlSchemaObject ProcessTypeName(Notation notation, Qname qname)
 {
     XmlSchemaObject schemaObject;
     TryProcessTypeName(notation, qname, true, out schemaObject);
     return schemaObject;
 }
Exemple #5
0
 private bool TryProcessTypeName(Notation notation, Qname qname, bool raise, out XmlSchemaObject schemaObject)
 {
     schemaObject = null;
     XmlQualifiedName qualifiedName =
         (XmlQualifiedName)ProcessQName(notation, qname, _context.NamespaceManager.DefaultNamespace);
     if (qualifiedName.Name == "anyAtomicType" && qualifiedName.Namespace == XmlReservedNs.NsXs)
     {
         schemaObject = XQuerySequenceType.XmlSchema.AnyAtomicType;
         return true;
     }
     if (qualifiedName.Name == "untypedAtomic" && qualifiedName.Namespace == XmlReservedNs.NsXs)
     {
         schemaObject = XQuerySequenceType.XmlSchema.UntypedAtomic;
         return true;
     }
     if (qualifiedName.Name == "anyType" && qualifiedName.Namespace == XmlReservedNs.NsXs)
     {
         schemaObject = XQuerySequenceType.XmlSchema.AnyType;
         return true;
     }
     if (qualifiedName.Name == "untyped" && qualifiedName.Namespace == XmlReservedNs.NsXs)            
         return true;
     if (qualifiedName.Name == "yearMonthDuration" && qualifiedName.Namespace == XmlReservedNs.NsXs)
     {
         schemaObject = XQuerySequenceType.XmlSchema.YearMonthDuration;
         return true;
     }
     if (qualifiedName.Name == "dayTimeDuration" && qualifiedName.Namespace == XmlReservedNs.NsXs)
     {
         schemaObject = XQuerySequenceType.XmlSchema.DayTimeDuration;
         return true;
     }
     if (qualifiedName.Namespace == XmlReservedNs.NsXs)
         schemaObject = XmlSchemaType.GetBuiltInSimpleType(qualifiedName);
     else
         schemaObject = _context.SchemaSet.GlobalTypes[qualifiedName];
     if (schemaObject == null && raise)
         throw new XQueryException(Properties.Resources.XPST0008, qualifiedName);            
     return schemaObject != null;
 }
Exemple #6
0
 public override object Clone()
 {
     Qname qname = new Qname();
     qname.data = data;
     return qname;
 }