public String xplFile() { if (node == null) { return ""; } else if (node.getDocumentURI() == null) { return ""; } else { return node.getDocumentURI().toASCIIString(); } }
public String xplFile() { if (node == null) { return ""; } else if (node.getDocumentURI() == null) { return ""; } else { return node.getDocumentURI().toASCIIString(); } }
static URI buildAbsoluteURI(String path, XdmNode doc) { URI u; try { u = new URI(path); } catch (URISyntaxException e) { try { u = new URI("file://" + path); } catch (URISyntaxException e1) { return null; } } if (!u.isAbsolute()) { u = doc.getDocumentURI().resolve(u); } return u; }
public String toString() { String result = "log for \"" + port + "\""; if (href != null) { result += " to \"" + href + "\""; } if (node.getLineNumber() > 0) { result += " at " + node.getDocumentURI() + ":" + node.getLineNumber(); } else { result += " in " + node.getDocumentURI(); } return result; } }
public String toString() { String result = "log for \"" + port + "\""; if (href != null) { result += " to \"" + href + "\""; } if (node.getLineNumber() > 0) { result += " at " + node.getDocumentURI() + ":" + node.getLineNumber(); } else { result += " in " + node.getDocumentURI(); } return result; } }
@Override public String toString() { String str = null; if (stepName.startsWith("#")) { str = "anonymous step " + stepType; } else { str = "step " + stepType + " named " + stepName; } if (node.getLineNumber() > 0) { str += " at " + node.getDocumentURI() + ":" + node.getLineNumber(); } else { str += " in " + node.getDocumentURI(); } return str; }
@Override public String toString() { String str = null; if (stepName.startsWith("#")) { str = "anonymous step " + stepType; } else { str = "step " + stepType + " named " + stepName; } if (node.getLineNumber() > 0) { str += " at " + node.getDocumentURI() + ":" + node.getLineNumber(); } else { str += " in " + node.getDocumentURI(); } return str; }
@Override public boolean parseNode(XdmNode node, URI documentURI) { String name = node.getNodeName().getLocalName(); if ("annotations".equalsIgnoreCase(name)) { String href = node.getAttributeValue(new QName(null, "href")); String type = node.getAttributeValue(new QName(null, "type")); if (type == null) { Logger.debug("missing attribute @type in node <annotations> of the config file"); return false; } if (!mAnnotations.containsKey(type)) mAnnotations.put(type, new ArrayList<XdmNode>()); if (href != null) { XdmNode external = ConfigReader.readFromURIinsideConfig(href, saxonproc, documentURI); if (external != null) { Logger.info("custom annotations read from " + external.getDocumentURI()); mAnnotations.get(type).add(external); } } else { Logger.info("custom embedded annotations read from " + documentURI); mAnnotations.get(type).add(node); } return true; } return false; }
@Override public boolean parseNode(XdmNode node, URI documentURI) { String name = node.getNodeName().getLocalName(); if ("lexicon".equalsIgnoreCase(name)) { String href = node.getAttributeValue(new QName(null, "href")); if (href != null) { XdmNode external = ConfigReader.readFromURIinsideConfig(href, saxonproc, documentURI); if (external != null) { Logger.info("custom annotations read from " + external.getDocumentURI()); mLexicons.add(external); } } else { Logger.info("custom embedded annotations read from " + documentURI); mLexicons.add(node); } return true; } return false; }
XdmNode doc = source.read(); logger.trace(MessageFormatter.nodeMessage(step.getNode(), "Message step " + step.getName() + " read " + doc.getDocumentURI())); result.write(doc);
public void run() throws SaxonApiException { super.run(); while (source.moreDocuments()) { XdmNode doc = source.read(); logger.trace("Identity step " + step.getName() + " read " + doc.getDocumentURI()); result.write(doc); } } }
public void run() throws SaxonApiException { super.run(); while (source.moreDocuments()) { XdmNode doc = source.read(); logger.trace("Identity step " + step.getName() + " read " + doc.getDocumentURI()); result.write(doc); } } }
XdmNode doc = source.read(); logger.trace(MessageFormatter.nodeMessage(step.getNode(), "Message step " + step.getName() + " read " + doc.getDocumentURI())); result.write(doc);
public void run() throws SaxonApiException { Processor proc = runtime.getProcessor(); LexiconsConfigExtension lexiconExt = new LexiconsConfigExtension(proc); new ConfigReader(proc, mConfig.read(), lexiconExt); int i = 0; for (XdmNode lexicon : lexiconExt.getLexicons()) { TreeWriter tw = new TreeWriter(proc); try { tw.startDocument(new URI(lexicon.getDocumentURI().toString().replace(".xml", ""+i++ +".xml"))); tw.addSubtree(lexicon); tw.endDocument(); mResult.write(tw.getResult()); } catch (URISyntaxException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
SpeechSheetAnalyser analyzer = new SpeechSheetAnalyser(); try { analyzer.analyse(alluris, cssExt.getEmbeddedCSS(), config.getDocumentURI(), mNetwork); } catch (Throwable t) { Logger.debug("error while analyzing CSS speech: " + t.getMessage()); XdmNode rebuilt = inliner.inline(this, doc.getDocumentURI(), doc, analyzer, mStyleNsOption);
public void run() throws SaxonApiException { super.run(); HashSet<String> excludeUris = S9apiUtils.excludeInlinePrefixes(step.getNode(), getOption(_prefixes).getString()); while (source.moreDocuments()) { XdmNode doc = source.read(); logger.trace(MessageFormatter.nodeMessage(step.getNode(), "Namespace-delete step " + step.getName() + " read " + doc.getDocumentURI())); doc = S9apiUtils.removeNamespaces(runtime, doc, excludeUris, false); result.write(doc); } } }
public void run() throws SaxonApiException { super.run(); HashSet<String> excludeUris = S9apiUtils.excludeInlinePrefixes(step.getNode(), getOption(_prefixes).getString()); while (source.moreDocuments()) { XdmNode doc = source.read(); logger.trace(MessageFormatter.nodeMessage(step.getNode(), "Namespace-delete step " + step.getName() + " read " + doc.getDocumentURI())); doc = S9apiUtils.removeNamespaces(runtime, doc, excludeUris, false); result.write(doc); } } }
URI docURI = doc.getDocumentURI();
logger.trace("Error step read empty"); } else { logger.trace("Error step read " + doc.getDocumentURI());
logger.trace("Error step read empty"); } else { logger.trace("Error step read " + doc.getDocumentURI());