public boolean processStartElement(XdmNode node) throws SaxonApiException { matcher.addStartElement(node, newName); matcher.addAttributes(node); return true; }
public boolean processStartElement(XdmNode node) throws SaxonApiException { matcher.addStartElement(node, newName); matcher.addAttributes(node); return true; }
public boolean processStartElement(XdmNode node) throws SaxonApiException { if (!inGroup.peek()) { matcher.addStartElement(wrapperCode, Untyped.getInstance(), null); } if (groupAdjacent != null && nextMatches(node)) { inGroup.pop(); inGroup.push(true); } else { inGroup.pop(); inGroup.push(false); } matcher.addStartElement(node); matcher.addAttributes(node); inGroup.push(false); // processEndElement will pop it! Value doesn't matter! return true; }
public boolean processStartElement(XdmNode node) throws SaxonApiException { if (!inGroup.peek()) { matcher.addStartElement(wrapperCode, Untyped.getInstance(), null); } if (groupAdjacent != null && nextMatches(node)) { inGroup.pop(); inGroup.push(true); } else { inGroup.pop(); inGroup.push(false); } matcher.addStartElement(node); matcher.addAttributes(node); inGroup.push(false); // processEndElement will pop it! Value doesn't matter! return true; }
public void processComment(XdmNode node) throws SaxonApiException { if (!inGroup.peek()) { matcher.addStartElement(wrapperCode, Untyped.getInstance(), null); } matcher.addComment(node.getStringValue()); if (groupAdjacent != null && nextMatches(node)) { inGroup.pop(); inGroup.push(true); } else { matcher.addEndElement(); inGroup.pop(); inGroup.push(false); } }
public void processText(XdmNode node) throws SaxonApiException { if (!inGroup.peek()) { matcher.addStartElement(wrapperCode, Untyped.getInstance(), null); } matcher.addText(node.getStringValue()); if (groupAdjacent != null && nextMatches(node)) { inGroup.pop(); inGroup.push(true); } else { matcher.addEndElement(); inGroup.pop(); inGroup.push(false); } }
public void processComment(XdmNode node) throws SaxonApiException { if (!inGroup.peek()) { matcher.addStartElement(wrapperCode, Untyped.getInstance(), null); } matcher.addComment(node.getStringValue()); if (groupAdjacent != null && nextMatches(node)) { inGroup.pop(); inGroup.push(true); } else { matcher.addEndElement(); inGroup.pop(); inGroup.push(false); } }
public void processText(XdmNode node) throws SaxonApiException { if (!inGroup.peek()) { matcher.addStartElement(wrapperCode, Untyped.getInstance(), null); } matcher.addText(node.getStringValue()); if (groupAdjacent != null && nextMatches(node)) { inGroup.pop(); inGroup.push(true); } else { matcher.addEndElement(); inGroup.pop(); inGroup.push(false); } }
public boolean processStartElement(XdmNode node) throws SaxonApiException { if ("before".equals(position)) { doInsert(); } matcher.addStartElement(node); matcher.addAttributes(node); matcher.startContent(); if ("first-child".equals(position)) { doInsert(); } return true; }
public boolean processStartElement(XdmNode node) throws SaxonApiException { if ("before".equals(position)) { doInsert(); } matcher.addStartElement(node); matcher.addAttributes(node); matcher.startContent(); if ("first-child".equals(position)) { doInsert(); } return true; }
public boolean processStartElement(XdmNode node) throws SaxonApiException { matcher.addStartElement(node); matcher.addAttributes(node); String value = node.getStringValue(); value = URIUtils.encode(value); URI baseURI = setBaseURI == null ? node.getBaseURI() : setBaseURI; String resolved = baseURI.resolve(value).toString(); matcher.addText(resolved); return false; }
public void processPI(XdmNode node) throws SaxonApiException { if (!inGroup.peek()) { matcher.addStartElement(wrapperCode, Untyped.getInstance(), null); } matcher.addPI(node.getNodeName().getLocalName(),node.getStringValue()); if (groupAdjacent != null && nextMatches(node)) { inGroup.pop(); inGroup.push(true); } else { matcher.addEndElement(); inGroup.pop(); inGroup.push(false); } }
public boolean processStartElement(XdmNode node) throws SaxonApiException { matcher.addStartElement(node); matcher.addAttributes(node); String value = node.getStringValue(); value = URIUtils.encode(value); URI baseURI = setBaseURI == null ? node.getBaseURI() : setBaseURI; String resolved = baseURI.resolve(value).toString(); matcher.addText(resolved); return false; }
public void processPI(XdmNode node) throws SaxonApiException { if (!inGroup.peek()) { matcher.addStartElement(wrapperCode, Untyped.getInstance(), null); } matcher.addPI(node.getNodeName().getLocalName(),node.getStringValue()); if (groupAdjacent != null && nextMatches(node)) { inGroup.pop(); inGroup.push(true); } else { matcher.addEndElement(); inGroup.pop(); inGroup.push(false); } }
public boolean processStartElement(XdmNode node) throws SaxonApiException { matcher.addStartElement(node); XdmSequenceIterator iter = node.axisIterator(Axis.ATTRIBUTE); while (iter.hasNext()) { XdmNode attr = (XdmNode) iter.next(); if (!attrs.contains(attr.getNodeName())) { matcher.addAttribute(attr); } } matcher.addAttributes(root); matcher.startContent(); return true; }
public boolean processStartElement(XdmNode node) throws SaxonApiException { matcher.addStartElement(node); XdmSequenceIterator iter = node.axisIterator(Axis.ATTRIBUTE); while (iter.hasNext()) { XdmNode attr = (XdmNode) iter.next(); if (!attrs.contains(attr.getNodeName())) { matcher.addAttribute(attr); } } matcher.addAttributes(root); matcher.startContent(); return true; }
public boolean processStartElement(XdmNode node) throws SaxonApiException { matcher.addStartElement(node); XdmSequenceIterator iter = node.axisIterator(Axis.ATTRIBUTE); while (iter.hasNext()) { XdmNode attr = (XdmNode) iter.next(); String value = attr.getStringValue(); if (value.contains("{") || value.contains("}")) { Vector<XdmItem> items = parse(attr, value); String newvalue = ""; for (XdmItem item : items) { newvalue += item.getStringValue(); } matcher.addAttribute(attr, newvalue); } else { matcher.addAttribute(attr); } } return true; }
public boolean processStartElement(XdmNode node) throws SaxonApiException { matcher.addStartElement(node); XdmSequenceIterator iter = node.axisIterator(Axis.ATTRIBUTE); while (iter.hasNext()) { XdmNode attr = (XdmNode) iter.next(); String value = attr.getStringValue(); if (value.contains("{") || value.contains("}")) { Vector<XdmItem> items = parse(attr, value); String newvalue = ""; for (XdmItem item : items) { newvalue += item.getStringValue(); } matcher.addAttribute(attr, newvalue); } else { matcher.addAttribute(attr); } } return true; }
public boolean processStartDocument(XdmNode node) throws SaxonApiException { matcher.startDocument(node.getBaseURI()); matcher.addStartElement(wrapperCode, Untyped.getInstance(), null); matcher.startContent(); matcher.addSubtree(node); matcher.addEndElement(); matcher.endDocument(); return false; }
public boolean processStartDocument(XdmNode node) throws SaxonApiException { matcher.startDocument(node.getBaseURI()); matcher.addStartElement(wrapperCode, Untyped.getInstance(), null); matcher.startContent(); matcher.addSubtree(node); matcher.addEndElement(); matcher.endDocument(); return false; }