parent.setImport(sc); stylesheet = new Stylesheet(parent); parent.setInclude(stylesheet); stylesheet.setDOMBackPointer(handler.getOriginatingNode()); stylesheet.setLocaterInfo(handler.getLocator()); stylesheet.setPrefixes(handler.getNamespaceSupport()); handler.pushStylesheet(stylesheet); setPropertiesFromAttributes(handler, rawName, attributes,
slocator.setSystemId(locator.getSystemId()); stylesheet.setLocaterInfo(slocator); stylesheet.setPrefixes(handler.getNamespaceSupport()); handler.pushStylesheet(stylesheet); if (stylesheet.getDeclaredPrefixes() == null || !declaredXSLNS(stylesheet)) stylesheet.setTemplate(template); isExtension = parentElem.containsExtensionElementURI(uri);
int s = included.getOutputCount(); for (int j = 0; j < s; j++) recomposableElements.addElement(included.getOutput(j)); s = included.getAttributeSetCount(); for (int j = 0; j < s; j++) recomposableElements.addElement(included.getAttributeSet(j)); s = included.getDecimalFormatCount(); for (int j = 0; j < s; j++) recomposableElements.addElement(included.getDecimalFormat(j)); s = included.getKeyCount(); for (int j = 0; j < s; j++) recomposableElements.addElement(included.getKey(j)); s = included.getNamespaceAliasCount(); for (int j = 0; j < s; j++) recomposableElements.addElement(included.getNamespaceAlias(j)); s = included.getTemplateCount(); for (int j = 0; j < s; j++) recomposableElements.addElement(included.getTemplate(j));
int n = stylesheet.getImportCount(); Stylesheet imported = stylesheet.getImport(i); n = stylesheet.getIncludeCount(); Stylesheet included = stylesheet.getInclude(i);
/** * Get an "xsl:decimal-format" property. * * @see DecimalFormatProperties * @see <a href="http://www.w3.org/TR/xslt#format-number">format-number in XSLT Specification</a> * * @param name The qualified name of the decimal format property. * @return null if not found, otherwise a DecimalFormatProperties * object, from which you can get a DecimalFormatSymbols object. */ public DecimalFormatProperties getDecimalFormat(QName name) { if (null == m_DecimalFormatDeclarations) return null; int n = getDecimalFormatCount(); for (int i = (n - 1); i >= 0; i++) { DecimalFormatProperties dfp = getDecimalFormat(i); if (dfp.getName().equals(name)) return dfp; } return null; }
while (count>0) int imports = getIncludeComposed(--count).getImportCount(); m_endImportCountComposed += imports; while (imports > 0) m_endImportCountComposed +=getIncludeComposed(count).getImport(--imports).getEndImportCountComposed();
parent.setImport(sc); stylesheet = new Stylesheet(parent); parent.setInclude(stylesheet); stylesheet.setLocaterInfo(handler.getLocator());
m_importNumber = getStylesheetRoot().getImportNumber(this); StylesheetRoot root = getStylesheetRoot(); int globalImportCount = root.getGlobalImportCount(); int count = getImportCount(); if ( count > 0) m_endImportCountComposed += this.getImport(--count).getEndImportCountComposed(); while (count>0) int imports = getIncludeComposed(--count).getImportCount(); m_endImportCountComposed += imports; while (imports > 0) m_endImportCountComposed +=getIncludeComposed(count).getImport(--imports).getEndImportCountComposed();
/** * Return the system identifier for the current document event. * * <p>If the system identifier is a URL, the parser must resolve it * fully before passing it to the application.</p> * * @return A string containing the system identifier, or null * if none is available. * @see #getPublicId */ public String getSystemId() { Stylesheet sheet=getStylesheet(); return (sheet==null) ? null : sheet.getHref(); }
/** * Tell if the result namespace decl should be excluded. Should be called before * namespace aliasing (I think). * * @param prefix non-null reference to prefix. * @param uri reference to namespace that prefix maps to, which is protected * for null, but should really never be passed as null. * * @return true if the given namespace should be excluded. * * @throws TransformerException */ private boolean excludeResultNSDecl(String prefix, String uri) throws TransformerException { if (uri != null) { if (uri.equals(Constants.S_XSLNAMESPACEURL) || getStylesheet().containsExtensionElementURI(uri)) return true; if (containsExcludeResultPrefix(prefix, uri)) return true; } return false; }
AttributesImpl undefines = null; boolean isCompatibleMode = ((null != handler.getStylesheet() && handler.getStylesheet().getCompatibleMode()) || !throwError); if (isCompatibleMode)
slocator.setSystemId(locator.getSystemId()); stylesheet.setLocaterInfo(slocator); stylesheet.setPrefixes(handler.getNamespaceSupport()); handler.pushStylesheet(stylesheet); stylesheet.setTemplate(template); isExtension = parentElem.containsExtensionElementURI(uri);
Rule authorizationRule = new Rule(); authorizationRule.setPattern(DocumentHelper.createPattern("//authorize")); final Stylesheet stylesheet = new Stylesheet(); authorizationRule.setAction(new Action(){ public void run(Node node) throws Exception { stylesheet.applyTemplates(node); } }); stylesheet.addRule(authorizationRule); stylesheet.run(document);
int n = stylesheet.getImportCount(); Stylesheet imported = stylesheet.getImport(i); n = stylesheet.getIncludeCount(); Stylesheet included = stylesheet.getInclude(i);
/** * Get an "xsl:decimal-format" property. * * @see DecimalFormatProperties * @see <a href="http://www.w3.org/TR/xslt#format-number">format-number in XSLT Specification</a> * * @param name The qualified name of the decimal format property. * @return null if not found, otherwise a DecimalFormatProperties * object, from which you can get a DecimalFormatSymbols object. */ public DecimalFormatProperties getDecimalFormat(QName name) { if (null == m_DecimalFormatDeclarations) return null; int n = getDecimalFormatCount(); for (int i = (n - 1); i >= 0; i++) { DecimalFormatProperties dfp = getDecimalFormat(i); if (dfp.getName().equals(name)) return dfp; } return null; }
while (count>0) int imports = getIncludeComposed(--count).getImportCount(); m_endImportCountComposed += imports; while (imports > 0) m_endImportCountComposed +=getIncludeComposed(count).getImport(--imports).getEndImportCountComposed();
parent.setImport(sc); stylesheet = new Stylesheet(parent); parent.setInclude(stylesheet); stylesheet.setLocaterInfo(handler.getLocator());
m_importNumber = getStylesheetRoot().getImportNumber(this); StylesheetRoot root = getStylesheetRoot(); int globalImportCount = root.getGlobalImportCount(); int count = getImportCount(); if ( count > 0) m_endImportCountComposed += this.getImport(--count).getEndImportCountComposed(); while (count>0) int imports = getIncludeComposed(--count).getImportCount(); m_endImportCountComposed += imports; while (imports > 0) m_endImportCountComposed +=getIncludeComposed(count).getImport(--imports).getEndImportCountComposed();
/** * Return the system identifier for the current document event. * * <p>If the system identifier is a URL, the parser must resolve it * fully before passing it to the application.</p> * * @return A string containing the system identifier, or null * if none is available. * @see #getPublicId */ public String getSystemId() { Stylesheet sheet=getStylesheet(); return (sheet==null) ? null : sheet.getHref(); }
/** * Tell if the result namespace decl should be excluded. Should be called before * namespace aliasing (I think). * * @param prefix non-null reference to prefix. * @param uri reference to namespace that prefix maps to, which is protected * for null, but should really never be passed as null. * * @return true if the given namespace should be excluded. * * @throws TransformerException */ private boolean excludeResultNSDecl(String prefix, String uri) throws TransformerException { if (uri != null) { if (uri.equals(Constants.S_XSLNAMESPACEURL) || getStylesheet().containsExtensionElementURI(uri)) return true; if (containsExcludeResultPrefix(prefix, uri)) return true; } return false; }