public class StylesheetModule extends Object
Modifier and Type | Field and Description |
---|---|
protected List<ComponentDeclaration> |
topLevel |
Constructor and Description |
---|
StylesheetModule(StyleElement rootElement,
int precedence) |
Modifier and Type | Method and Description |
---|---|
static Source |
getAssociatedStylesheet(Configuration config,
URIResolver resolver,
Source source,
String media,
String title,
String charset)
Get the stylesheet specification(s) associated
via the xml-stylesheet processing instruction (see
http://www.w3.org/TR/xml-stylesheet/) with the document
document specified in the source parameter, and that match
the given criteria.
|
Configuration |
getConfiguration() |
StylesheetModule |
getImporter() |
int |
getInputTypeAnnotations()
Get the value of the input-type-annotations attribute, for this module combined with that
of all included/imported modules.
|
int |
getMinImportPrecedence()
Get the minimum import precedence of this module, that is, the lowest import precedence of the modules
that it imports.
|
int |
getPrecedence() |
StylesheetPackage |
getPrincipalStylesheetModule() |
StyleElement |
getRootElement() |
XSLModuleRoot |
getStylesheetElement() |
static DocumentImpl |
loadStylesheetModule(Source styleSource,
boolean topLevelModule,
Compilation compilation,
NestedIntegerValue precedence)
Build the tree representation of a stylesheet module
|
void |
setImporter(StylesheetModule importer) |
void |
setInputTypeAnnotations(int annotations)
Set the value of the input-type-annotations attribute, for this module combined with that
of all included/imported modules.
|
void |
setMinImportPrecedence(int min)
Set the minimum import precedence of this module, that is, the lowest import precedence of the modules
that it imports.
|
void |
setWasIncluded()
Indicate that this stylesheet was included (by its "importer") using an xsl:include
statement as distinct from xsl:import
|
void |
spliceIncludes()
Process xsl:include and xsl:import elements.
|
protected List<ComponentDeclaration> topLevel
public StylesheetModule(StyleElement rootElement, int precedence)
public static DocumentImpl loadStylesheetModule(Source styleSource, boolean topLevelModule, Compilation compilation, NestedIntegerValue precedence) throws XPathException
styleSource
- the source of the moduletopLevelModule
- true if this module is the outermost module of a packagecompilation
- the XSLT compilation episodeprecedence
- the import precedence for static variables declared
in the module. (This is handled differently from the precedence of other components
because it needs to be allocated purely sequentially). @return the root Document node of the tree containing the stylesheet
moduleXPathException
- if XML parsing or tree
construction failspublic static Source getAssociatedStylesheet(Configuration config, URIResolver resolver, Source source, String media, String title, String charset) throws XPathException
config
- The Saxon Configurationsource
- The XML source document.media
- The media attribute to be matched. May be null, in which
case the prefered templates will be used (i.e. alternate = no).title
- The value of the title attribute to match. May be null.charset
- The value of the charset attribute to match. May be null.XPathException
- if any problems occurpublic void setImporter(StylesheetModule importer)
public StylesheetModule getImporter()
public StylesheetPackage getPrincipalStylesheetModule()
public StyleElement getRootElement()
public XSLModuleRoot getStylesheetElement()
public Configuration getConfiguration()
public int getPrecedence()
public void setWasIncluded()
public void setMinImportPrecedence(int min)
min
- the minimum import precedencepublic int getMinImportPrecedence()
public void spliceIncludes() throws XPathException
XPathException
- if the included/imported module is invalidpublic int getInputTypeAnnotations()
XSLModuleRoot.ANNOTATION_STRIP
and XSLModuleRoot.ANNOTATION_PRESERVE
public void setInputTypeAnnotations(int annotations) throws XPathException
XSLModuleRoot.ANNOTATION_STRIP
and XSLModuleRoot.ANNOTATION_PRESERVE
annotations
- the value of the input-type-annotations attribute, for this module combined with that
of all included/imported modules.XPathException
- if the values of the attribute in different modules are inconsistentCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.