/// <summary> /// Retrieves the context node's attributes. /// </summary> /// <param name="node"> /// is the type of node. </param> public override void iterate(NodeType node, ResultBuffer copyInto, Node limitNode) { // only elements have attributes if (!(node is ElementType)) { return; } // get attributes ElementType elem = (ElementType)node; NamedNodeMap attrs = elem.value().Attributes; if (attrs == null) { return; } // add attributes for (int i = 0; i < attrs.Length; i++) { Attr attr = (Attr)attrs.item(i); copyInto.add(NodeType.dom_to_xpath(attr, node.TypeModel)); } }
/* * Use an XPath string to select a nodelist. * XPath namespace prefixes are resolved from the namespaceNode. * * @param contextNode The node to start searching from. * @param str A valid XPath string. * @param namespaceNode The node from which prefixes in the XPath will be resolved to namespaces. * @return A NodeIterator, should never be null. * * @throws TransformerException */ public static org.w3c.dom.NodeList selectNodeList( org.w3c.dom.Node contextNode, String str, org.w3c.dom.Node namespaceNode) //throws TransformerException { // Execute the XPath, and have it return the result throw new java.lang.UnsupportedOperationException("XALAN-J not yet implemented"); }
/** * Creates a <code>DOMStructure</code> containing the specified node. * * @param node the node * @throws NullPointerException if <code>node</code> is <code>null</code> */ public DOMStructure(org.w3c.dom.Node node) { if (node == null) { throw new java.lang.NullPointerException("node cannot be null"); } this.node = node; }
/// <summary> /// Retrieve the the descendants of the context node and the context node /// itself. /// </summary> /// <param name="node"> /// is the type of node. </param> public override void iterate(NodeType node, ResultBuffer rs, Node limitNode) { // add self rs.add(node); // add descendants (new DescendantAxis()).iterate(node, rs, null); }
/* * Sets the node. * * @param node the node * @throws NullPointerException if <code>node</code> is <code>null</code> * @see #getNode */ public void setNode(org.w3c.dom.Node node) { if (node == null) { throw new java.lang.NullPointerException(); } this.node = node; }
/// <summary> /// Get ancestor nodes of the context node and the context node itself. /// </summary> /// <param name="node"> /// is the type of node. </param> public override void iterate(NodeType node, ResultBuffer copyInto, Node limitNode) { // get ancestors AncestorAxis aa = new AncestorAxis(); aa.iterate(node, copyInto, null); // add self copyInto.add(node); }
/** * Creates a <code>DOMValidateContext</code> containing the specified key * selector and node. * * @param ks a key selector for finding a validation key * @param node the node * @throws NullPointerException if <code>ks</code> or <code>node</code> is * <code>null</code> */ public DOMValidateContext(KeySelector ks, org.w3c.dom.Node node) { if (ks == null) { throw new java.lang.NullPointerException("key selector is null"); } if (node == null) { throw new java.lang.NullPointerException("node is null"); } setKeySelector(ks); this.node = node; }
/** * Creates a <code>DOMSignContext</code> with the specified signing key * and parent node. The signing key is stored in a * {@link KeySelector#singletonKeySelector singleton KeySelector} that is * returned by the {@link #getKeySelector getKeySelector} method. * The marshalled <code>XMLSignature</code> will be added as the last * child element of the specified parent node unless a next sibling node is * specified by invoking the {@link #setNextSibling setNextSibling} method. * * @param signingKey the signing key * @param parent the parent node * @throws NullPointerException if <code>signingKey</code> or * <code>parent</code> is <code>null</code> */ public DOMSignContext(java.security.Key signingKey, org.w3c.dom.Node parent) { if (signingKey == null) { throw new java.lang.NullPointerException("signingKey cannot be null"); } if (parent == null) { throw new java.lang.NullPointerException("parent cannot be null"); } setKeySelector(KeySelector.singletonKeySelector(signingKey)); this.parent = parent; }
/* * Creates a <code>DOMValidateContext</code> containing the specified key * selector and node. * * @param ks a key selector for finding a validation key * @param node the node * @throws NullPointerException if <code>ks</code> or <code>node</code> is * <code>null</code> */ public DOMValidateContext(KeySelector ks, org.w3c.dom.Node node) { if (ks == null) { throw new java.lang.NullPointerException("key selector is null"); } if (node == null) { throw new java.lang.NullPointerException("node is null"); } setKeySelector(ks); this.node = node; }
/* * Creates a <code>DOMValidateContext</code> containing the specified key * and node. The validating key will be stored in a * {@link KeySelector#singletonKeySelector singleton KeySelector} that * is returned when the {@link #getKeySelector getKeySelector} * method is called. * * @param validatingKey the validating key * @param node the node * @throws NullPointerException if <code>validatingKey</code> or * <code>node</code> is <code>null</code> */ public DOMValidateContext(java.security.Key validatingKey, org.w3c.dom.Node node) { if (validatingKey == null) { throw new java.lang.NullPointerException("validatingKey is null"); } if (node == null) { throw new java.lang.NullPointerException("node is null"); } setKeySelector(KeySelector.singletonKeySelector(validatingKey)); this.node = node; }
/** * Creates a <code>DOMSignContext</code> with the specified key selector * and parent node. The marshalled <code>XMLSignature</code> will be added * as the last child element of the specified parent node unless a next * sibling node is specified by invoking the * {@link #setNextSibling setNextSibling} method. * * @param ks the key selector * @param parent the parent node * @throws NullPointerException if <code>ks</code> or <code>parent</code> * is <code>null</code> */ public DOMSignContext(KeySelector ks, org.w3c.dom.Node parent) { if (ks == null) { throw new java.lang.NullPointerException("key selector cannot be null"); } if (parent == null) { throw new java.lang.NullPointerException("parent cannot be null"); } setKeySelector(ks); this.parent = parent; }
/// <summary> /// Return the result of FollowingSiblingAxis expression /// </summary> /// <param name="node"> /// is the type of node. </param> public override void iterate(NodeType node, ResultBuffer copyInto, Node limitNode) { // XXX check for attribute / namespace node... if so return // empty sequence Node iterNode = node.node_value(); // get the children of the parent [siblings] do { iterNode = iterNode.NextSibling; if (iterNode != null) { NodeType nodeType = NodeType.dom_to_xpath(iterNode, node.TypeModel); if (nodeType != null) { copyInto.add(nodeType); } } } while (iterNode != null); }
public void InternalFixTextNode(org.w3c.dom.Node n) { const int TEXT_NODE = 3; var nl = n.getChildNodes(); for (int i = 0; i < nl.getLength(); i++) { var k = nl.item(i); var IsTextNode = k.getNodeType() == TEXT_NODE; var IsContentNull = k.getNodeValue() == null; if (IsTextNode && IsContentNull) { k.setNodeValue(""); } else { InternalFixTextNode(k); } } }
/// <summary> /// Get the ancestors of the context node. /// </summary> /// <param name="node"> /// is the type of node. </param> // XXX unify this with descendants axis ? public override void iterate(NodeType node, ResultBuffer copyInto, Node limitNode) { if (limitNode != null && limitNode.isSameNode(node.node_value())) { return; } int before = copyInto.size(); // get the parent base.iterate(node, copyInto, limitNode); // no parent if (copyInto.size() == before) { return; } NodeType parent = (NodeType)copyInto.item(before); // get ancestors of parent iterate(parent, copyInto, limitNode); }
public void surroundContents(Node newParent) { }
public void selectNodeContents(Node refNode) { }
public void setEndAfter(Node refNode) { }
public void setStartAfter(Node refNode) { }
public void setEnd(Node refNode, int offset) { }
public short canAppendChild(Node newChild) { return(default(short)); }
public string writeToString(Node nodeArg) { return default(string); }
public short acceptNode(Node nodeArg) { return default(short); }
public object evaluate(string expression, Node contextNode, XPathNSResolver resolver, short type, object result) { return default(object); }
public XPathNSResolver createNSResolver(Node nodeResolver) { return default(XPathNSResolver); }
public void dirxml(Node node) {}
public void initMutationNameEvent(string typeArg, bool canBubbleArg, bool cancelableArg, Node relatedNodeArg, string prevNamespaceURIArg, string prevNodeNameArg) {}
public bool writeToURI(Node nodeArg, string uri) { return(default(bool)); }
/** * Creates a <code>DOMValidateContext</code> containing the specified key * and node. The validating key will be stored in a * {@link KeySelector#singletonKeySelector singleton KeySelector} that * is returned when the {@link #getKeySelector getKeySelector} * method is called. * * @param validatingKey the validating key * @param node the node * @throws NullPointerException if <code>validatingKey</code> or * <code>node</code> is <code>null</code> */ public DOMValidateContext(java.security.Key validatingKey, org.w3c.dom.Node node) { if (validatingKey == null) { throw new java.lang.NullPointerException("validatingKey is null"); } if (node == null) { throw new java.lang.NullPointerException("node is null"); } setKeySelector(KeySelector.singletonKeySelector(validatingKey)); this.node = node; }
public Node parseWithContext(LSInput input, Node contextArg, short action) { return default(Node); }
public short canReplaceChild(Node newChild, Node oldChild) { return(default(short)); }
/** * Sets the next sibling node. * * @param nextSibling the next sibling node. The marshalled * <code>XMLSignature</code> will be inserted immediately before this * node. Specify <code>null</code> to remove the current setting. * @see #getNextSibling */ public void setNextSibling(org.w3c.dom.Node nextSibling) { this.nextSibling = nextSibling; }
public void setStart(Node refNode, int offset) { }
/** * Creates a <code>DOMSignContext</code> with the specified key selector, * parent and next sibling nodes. The marshalled <code>XMLSignature</code> * will be inserted as a child element of the specified parent node and * immediately before the specified next sibling node. * * @param ks the key selector * @param parent the parent node * @param nextSibling the next sibling node * @throws NullPointerException if <code>ks</code>, <code>parent</code> or * <code>nextSibling</code> is <code>null</code> */ public DOMSignContext(KeySelector ks, org.w3c.dom.Node parent, org.w3c.dom.Node nextSibling) { if (ks == null) { throw new java.lang.NullPointerException("key selector cannot be null"); } if (parent == null) { throw new java.lang.NullPointerException("parent cannot be null"); } if (nextSibling == null) { throw new java.lang.NullPointerException("nextSibling cannot be null"); } setKeySelector(ks); this.parent = parent; this.nextSibling = nextSibling; }
public void setStartBefore(Node refNode) { }
public void initMutationEvent(string typeArg, bool canBubbleArg, bool cancelableArg, Node relatedNodeArg, string prevValueArg, string newValueArg, string attrNameArg, short attrChangeArg) {}
public void setEndBefore(Node refNode) { }
/** * Sets the parent node. * * @param parent the parent node. The marshalled <code>XMLSignature</code> * will be added as a child element of this node. * @throws NullPointerException if <code>parent</code> is <code>null</code> * @see #getParent */ public void setParent(org.w3c.dom.Node parent) { if (parent == null) { throw new java.lang.NullPointerException("parent is null"); } this.parent = parent; }
public void selectNode(Node refNode) { }
public TreeWalker createTreeWalker(Node root, int whatToShow, NodeFilter filter, bool entityReferenceExpansion) { return default(TreeWalker); }
public void insertNode(Node newNode) { }
public bool write(Node nodeArg, LSOutput destination) { return default(bool); }
public bool write(Node nodeArg, LSOutput destination) { return(default(bool)); }
public bool writeToURI(Node nodeArg, string uri) { return default(bool); }
public string writeToString(Node nodeArg) { return(default(string)); }
/** * Sets the node. * * @param node the node * @throws NullPointerException if <code>node</code> is <code>null</code> * @see #getNode */ public void setNode(org.w3c.dom.Node node) { if (node == null) { throw new java.lang.NullPointerException(); } this.node = node; }
public short canRemoveAttributeNode(Node attrNode) { return default(short); }
// DocumentTraversal public NodeIterator createNodeIterator(Node root, int whatToShow, NodeFilter filter, bool entityReferenceExpansion) { return default(NodeIterator); }