/** * Get the KeyManager, containing definitions of keys available for use. * * @return the KeyManager. This is used to resolve key names, both explicit calls * on key() used in XSLT, and system-generated calls on key() which may * also appear in XQuery and XPath */ public KeyManager getKeyManager() { return element.getCompilation().getPrincipalStylesheetModule().getKeyManager(); }
/** * Get a DecimalFormatManager to resolve the names of decimal formats used in calls * to the format-number() function. * * @return the decimal format manager for this static context, or null if named decimal * formats are not supported in this environment. */ public DecimalFormatManager getDecimalFormatManager() { return element.getCompilation().getPrincipalStylesheetModule().getDecimalFormatManager(); }
/** * Mark tail-recursive calls on stylesheet functions. For most instructions, this does nothing. */ public boolean markTailCalls() { StyleElement last = getLastChildInstruction(); return last != null && last.markTailCalls(); }
@Override public void validateSubtree(ComponentDeclaration decl, boolean excludeStylesheet) throws XPathException { if (!isDeferredCompilation(getCompilation())) { super.validateSubtree(decl, excludeStylesheet); } else { try { validate(decl); } catch (XPathException err) { compileError(err); } } }
/** * Check that the variable is not already declared, and allocate a slot number */ public void validate() throws XPathException { super.validate(); if (global) { if (!redundant) { slotNumber = getPrincipalStylesheet().allocateGlobalSlot(getVariableQName()); } } }
/** * Mark tail-recursive calls on stylesheet functions. For most instructions, this does nothing. */ public boolean markTailCalls() { StyleElement last = getLastChildInstruction(); return last != null && last.markTailCalls(); }
/** * Mark tail-recursive calls on stylesheet functions. For most instructions, this does nothing. */ public boolean markTailCalls() { StyleElement last = getLastChildInstruction(); return last != null && last.markTailCalls(); }
/** * Ask whether the compilation of the template should be deferred * * @param compilation the compilation * @return true if compilation should be deferred */ public boolean isDeferredCompilation(Compilation compilation) { return compilation.isPreScan() && getTemplateName() == null && !compilation.isLibraryPackage(); }
@Override public void fixupReferences() throws XPathException { sourceBinding.fixupReferences(compiledVariable); super.fixupReferences(); }
public void prepareAttributes() throws XPathException { if (state == 2) { return; } if (state == 1) { compileError("Circular reference to variable", "XTDE0640"); } state = 1; //System.err.println("Prepare attributes of $" + getVariableName()); sourceBinding.prepareAttributes(getPermittedAttributes()); state = 2; }
public void prepareAttributes() throws XPathException { test = XSLIf.prepareTestAttribute(this); if (test == null) { reportAbsence("test"); } }
public Expression compile(Compilation exec, ComponentDeclaration decl) throws XPathException { if (select == null) { select = compileSequenceConstructor(exec, decl, true); } ((XSLTry) getParent()).addCatchClause(nameTest, select); return null; }
@Override public void fixupReferences() throws XPathException { sourceBinding.fixupReferences(null); super.fixupReferences(); }
/** * Get the principal stylesheet module of the package in which * this XSLT element appears * * @return the containing package */ public PrincipalStylesheetModule getPrincipalStylesheetModule() { return getCompilation().getPrincipalStylesheetModule(); }
@Override // protected boolean seesAvuncularVariables() { // return false; // } public void prepareAttributes() throws XPathException { super.prepareAttributes(); if (stable != null) { compileError("The @stable attribute is not allowed in xsl:merge-key", "XTSE0090"); } }
/** * Ask whether the code is compiled in schema-aware mode * * @return true if the compilation is schema-aware */ public boolean isSchemaAware() { return getCompilation().isSchemaAware(); }
public TextValueTemplateContext getStaticContext() { if (staticContext == null) { staticContext = new TextValueTemplateContext((StyleElement) getParent(), this); } return staticContext; }
/** * Get the version number of the package (the value of the attribute <code>xsl:package/@package-version</code>. * Note that this may have had trailing zeroes truncated. * * @return the package version number(s)+suffix? */ public String getVersion() { return stylesheetPackage.getPackageVersion().toString(); }