예제 #1
0
 /// <summary>
 /// Append an  arbitrary item (node or atomic value) to the output
 /// </summary>
 /// <param name="item">the item to be appended</param>
 /// <param name="location">the location of the calling instruction, for diagnostics</param>
 /// <param name="copyNamespaces">if the item is an element node, this indicates whether its namespace need to be copied.
 /// 0x80000 means ALL_NAMESPACE, 0x40000 means LOCAL_NAMESPACE and 0 means no namespace</param>
 public override void append(JItem item, JLocation location, int copyNamespaces)
 {
     if (level == 0)
     {
         JXPathException e = new JXPathException("When writing to an XdmDestination, atomic values are only allowed within a document or element node");
     }
     base.append(item, location, copyNamespaces);
 }
예제 #2
0
 /// <summary>
 /// Output a comment
 /// </summary>
 /// <param name="chars">The content of the comment</param>
 /// <param name="location">provides information such as line number and system ID</param>
 /// <param name="properties">Additional information about the comment</param>
 public override void comment(JCharSequence chars, JLocation location, int properties)
 {
     if (level == 0)
     {
         JXPathException e = new JXPathException("When writing to an XdmDestination, comment nodes are only allowed within a document or element node");
     }
     base.comment(chars, location, properties);
 }
예제 #3
0
 /// <summary>
 /// Character data
 /// </summary>
 /// <param name="chars">Character data as input</param>
 /// <param name="location">Provides information such as line number and system ID</param>
 /// <param name="properties">Bit significant value. The following bits are defined</param>
 public override void characters(JCharSequence chars, JLocation location, int properties)
 {
     if (level == 0)
     {
         JXPathException e = new JXPathException("When writing to an XdmDestination, text nodes are only allowed within a document or element node");
         throw new DynamicError(e);
     }
     base.characters(chars, location, properties);
 }
예제 #4
0
 /// <summary>
 /// Processing instruction
 /// </summary>
 /// <param name="target">The PI name. This must be a legal name (it will not be checked)</param>
 /// <param name="data">The data portion of the processing instruction</param>
 /// <param name="location">provides information about the PI</param>
 /// <param name="properties">Additional information about the PI</param>
 public override void processingInstruction(String target, JCharSequence data, JLocation location, int properties)
 {
     if (level == 0)
     {
         JXPathException e = new JXPathException("When writing to an XdmDestination, processing instructions are only allowed within a document or element node");
         throw new DynamicError(e);
     }
     base.processingInstruction(target, data, location, properties);
 }
예제 #5
0
 /// <summary>
 /// Notify the start of an element
 /// </summary>
 /// <param name="nameCode"></param>
 /// <param name="typeCode"></param>
 /// <param name="attributes"></param>
 /// <param name="namespaces"></param>
 /// <param name="location"></param>
 /// <param name="properties"></param>
 public override void startElement(JNodeName nameCode, JSchemaType typeCode, JAttributeMap attributes, JNamespaceMap namespaces, JLocation location, int properties)
 {
     if (ended)
     {
         JXPathException e = new JXPathException("Only a single root node can be written to an XdmDestination");
         throw new DynamicError(e);
     }
     base.startElement(nameCode, typeCode, attributes, namespaces, location, properties);
     level++;
 }