/** * Create the node factory for representing an XSLT stylesheet as a tree structure * * @param config the Saxon configuration * @param compilation the compilation episode (compiling one package) */ public StyleNodeFactory(Configuration config, Compilation compilation) { this.config = config; this.compilation = compilation; namePool = config.getNamePool(); }
/** * Get the Name Pool */ public NamePool getNamePool() { return config.getNamePool(); }
/** * Get the name pool for this node * @return the NamePool */ public NamePool getNamePool() { return config.getNamePool(); }
/** * Get the NamePool used for compiling expressions */ public NamePool getNamePool() { return config.getNamePool(); }
/** * Get the name pool for this node * * @return the NamePool */ public NamePool getNamePool() { return getConfiguration().getNamePool(); }
/** * Get the local name of this type * * @return the local name of this type definition, if it has one. Return null in the case of an * anonymous type. */ public String getName() { return config.getNamePool().getLocalName(fingerprint); }
/** * Get the Name Pool */ public final NamePool getNamePool() { return controller.getConfiguration().getNamePool(); }
/** * Get the NamePool that holds the namecode for this node * * @return the namepool */ public NamePool getNamePool() { return getConfiguration().getNamePool(); }
/** * Get the target namespace of this type * * @return the target namespace of this type definition, if it has one. Return null in the case * of an anonymous type, and in the case of a global type defined in a no-namespace schema. */ public String getTargetNamespace() { return config.getNamePool().getURI(fingerprint); }
/** * Helper method to get the current namePool * * @return the NamePool */ public final NamePool getNamePool() { return getPipelineConfiguration().getConfiguration().getNamePool(); }
public Builder(PipelineConfiguration pipe) { this.pipe = pipe; config = pipe.getConfiguration(); lineNumbering = config.isLineNumbering(); namePool = config.getNamePool(); }
/** * Static method used to create the default static context: intended for internal use only */ public static StaticQueryContext makeDefaultStaticQueryContext(Configuration config) { StaticQueryContext sqc = new StaticQueryContext(); sqc.config = config; sqc.namePool = config.getNamePool(); sqc.reset(); return sqc; }
/** * Start of a document node. */ public void startDocument(int properties) throws XPathException { nextReceiver.startDocument(properties); pool = getPipelineConfiguration().getConfiguration().getNamePool(); }
/** * Get the fingerprint of the node. This is used to compare whether two nodes * have equivalent names. Return -1 for a node with no name. */ public int getFingerprint() { NodeName name = getNodeName(); if (name == null) { return -1; } else { return name.obtainFingerprint(getConfiguration().getNamePool()); } }
@Override public void markNamespaceNode(NodeInfo origin) { NodeInfo element = builder.getCurrentParentNode(); NamePool pool = builder.getConfiguration().getNamePool(); String prefix = origin.getLocalPart(); markedNode = element.iterateAxis( AxisInfo.NAMESPACE, new NameTest(Type.NAMESPACE, "", prefix, pool)).next(); mark = -1; }
public void attribute(NodeName name, SimpleType typeCode, CharSequence value, Location locationId, int properties) throws XPathException { super.attribute(name, typeCode, value, locationId, properties); if (mark == Type.ATTRIBUTE) { NodeInfo element = builder.getCurrentParentNode(); markedNode = element.iterateAxis( AxisInfo.ATTRIBUTE, new NameTest(Type.ATTRIBUTE, name, builder.getConfiguration().getNamePool())).next(); mark = -1; } }
public PathMap.PathMapNodeSet addToPathMap(PathMap pathMap, PathMap.PathMapNodeSet pathMapNodeSet) { if (pathMapNodeSet == null) { ContextItemExpression cie = new ContextItemExpression(); pathMapNodeSet = new PathMap.PathMapNodeSet(pathMap.makeNewRoot(cie)); } return pathMapNodeSet.createArc(AxisInfo.ATTRIBUTE, new NameTest(Type.ATTRIBUTE, attributeName, getConfiguration().getNamePool())); }
/** * Set configuration information. This must only be called before any events * have been read. */ public void setPipelineConfiguration(PipelineConfiguration pipe) { this.pipe = new PipelineConfiguration(pipe); this.namePool = pipe.getConfiguration().getNamePool(); ignoreIgnorable = pipe.getConfiguration().getParseOptions().getSpaceStrippingRule() != NoElementsSpaceStrippingRule.getInstance(); }
/** * Get the fingerprint required */ public int getFingerprint() { if (origin.hasFingerprint()) { return origin.getFingerprint(); } else { NamePool pool = origin.getConfiguration().getNamePool(); return pool.allocateFingerprint(origin.getURI(), origin.getLocalPart()); } }
/** * Diagnostic print of expression structure. The abstract expression tree * is written to the supplied output destination. */ public void explain(ExpressionPresenter out) { out.startElement("treat"); out.emitAttribute("as", requiredItemType.toString(out.getConfiguration().getNamePool())); operand.explain(out); out.endElement(); }