Package wt.util.xml.xslt
Class XMLSourceFactory
java.lang.Object
wt.util.xml.xslt.XMLSourceFactory
This factory class produces implementation instances of the interfaces
in this package. Instances of this class should not be assumed to be
thread-safe.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptionstatic XMLSourceFactoryCreate an instance of the defauly implementation provided with Windchill.newDOMSource(Node node) Create a new DOMXMLSource for the provided DOM Node.newDOMSource(Node node, String baseURI) Create a new DOMXMLSource for the provided DOM Node and base URI.newReaderSource(Reader reader) Create a new ReaderXMLSource for the provided Reader.newReaderSource(Reader reader, String baseURI) Create a new ReaderXMLSource for the provided Reader and base URI.newStreamSource(InputStream inputStream) Create a new StreamXMLSource for the provided InputStream.newStreamSource(InputStream inputStream, String baseURI) Create a new StreamXMLSource for the provided InputStream and base URI.abstract StylesheetnewStylesheet(XMLSource xslSource) Create a new Stylesheet instance for the XSL document identified by the XMLSource.newURLSource(File file) Create a new URLXMLSource for the provided File.newURLSource(URL url) Create a new URLXMLSource for the provided URL.newURLSource(URL url, String baseURI) Create a new URLXMLSource for the provided URL and base URI.abstract XSLTransformnewXSLTransform(XMLSource xmlSource, Stylesheet stylesheet, Hashtable inputParameters) Create an XSLTransform instance to apply the stylesheet to the XML document identified by xmlSource.abstract XSLTransformnewXSLTransform(XMLSource xmlSource, Stylesheet stylesheet, Hashtable inputParameters, String baseURI) Create an XSLTransform instance to apply the stylesheet to the XML document identified by xmlSource.
-
Method Details
-
getFactory
Create an instance of the defauly implementation provided with Windchill.
Supported API: true- Returns:
- XMLSourceFactory
-
newURLSource
Create a new URLXMLSource for the provided URL. The base URI will be derived from the URI.
Supported API: true- Parameters:
url-- Returns:
- URLXMLSource
-
newURLSource
Create a new URLXMLSource for the provided URL and base URI. This method should be used instead of newURLSource(URL) when you want to either:- reference DTD's in locations relative to a base location that differs from the XML source data's URL or
- use the the XSLT
document()to load additional XML data using relative URLs with a base location that differs from the XML source data's URL
Supported API: true- Parameters:
url-baseURI-- Returns:
- URLXMLSource
-
newURLSource
Create a new URLXMLSource for the provided File. The base URI will be derived from the URI.
Supported API: true- Parameters:
file-- Returns:
- URLXMLSource
- Throws:
MalformedURLException
-
newDOMSource
Create a new DOMXMLSource for the provided DOM Node. The base URI will be undefined. This may cause the XSLT functiondocument()to fail when URLs passed to it are not fully qualified. Similarly, DTDs referenced from DOCTYPE tags within the XML document without fully qualified URLs will not be found.
Supported API: true- Parameters:
node-- Returns:
- DOMXMLSource
-
newDOMSource
Create a new DOMXMLSource for the provided DOM Node and base URI. Use of the XSLT functiondocument()with URLs that are relative, will be relative to the base URI. Similarly, DTD's that are referenced from DOCTYPE tags in the XML data via relative URLs will be loaded from the base URI.
Supported API: true- Parameters:
node-baseURI-- Returns:
- DOMXMLSource
-
newStreamSource
Create a new StreamXMLSource for the provided InputStream. The base URI will be undefined. This may cause the XSLT functiondocument()to fail when URLs passed to it are not fully qualified. Similarly, DTDs referenced from DOCTYPE tags within the XML document without fully qualified URLs will not be found.
Supported API: true- Parameters:
inputStream-- Returns:
- StreamXMLSource
-
newStreamSource
Create a new StreamXMLSource for the provided InputStream and base URI. Use of the XSLT functiondocument()with URLs that are relative, will be relative to the base URI. Similarly, DTD's that are referenced from DOCTYPE tags in the XML data via relative URLs will be loaded from the base URI.
Supported API: true- Parameters:
inputStream-baseURI-- Returns:
- StreamXMLSource
-
newReaderSource
Create a new ReaderXMLSource for the provided Reader. The base URI will be undefined. This may cause the XSLT functiondocument()to fail when URLs passed to it are not fully qualified. Similarly, DTDs referenced from DOCTYPE tags within the XML document without fully qualified URLs will not be found.
Supported API: true- Parameters:
reader-- Returns:
- ReaderXMLSource
-
newReaderSource
Create a new ReaderXMLSource for the provided Reader and base URI. Use of the XSLT functiondocument()with URLs that are relative, will be relative to the base URI. Similarly, DTD's that are referenced from DOCTYPE tags in the XML data via relative URLs will be loaded from the base URI.
Supported API: true- Parameters:
reader-baseURI-- Returns:
- ReaderXMLSource
-
newXSLTransform
public abstract XSLTransform newXSLTransform(XMLSource xmlSource, Stylesheet stylesheet, Hashtable inputParameters) throws SAXException, IOException Create an XSLTransform instance to apply the stylesheet to the XML document identified by xmlSource. Parameters may be passed to the XSLT stylesheet in the hashtable (the hashtable may be null if no parameters are being passed). Stylesheets imported or included by the provided Stylesheet are located relative to the base URI of the XMLSource that produced the Stylesheet if they are not fully qualified.
Supported API: true- Parameters:
xmlSource-stylesheet-inputParameters-- Returns:
- XSLTransform
- Throws:
SAXExceptionIOException- See Also:
-
newXSLTransform
public abstract XSLTransform newXSLTransform(XMLSource xmlSource, Stylesheet stylesheet, Hashtable inputParameters, String baseURI) throws SAXException, IOException Create an XSLTransform instance to apply the stylesheet to the XML document identified by xmlSource. Parameters may be passed to the XSLT stylesheet in the hashtable (the hashtable may be null if no parameters are being passed). Stylesheets imported or included by the provided Stylesheet are located relative to the specified base URI if they are not fully qualified.
Supported API: true- Parameters:
xmlSource-stylesheet-inputParameters-baseURI-- Returns:
- XSLTransform
- Throws:
SAXExceptionIOException- See Also:
-
newStylesheet
Create a new Stylesheet instance for the XSL document identified by the XMLSource. Once instantiated, this Stylesheet can be repeatedly by XSLTTransforms.
Supported API: true- Parameters:
xslSource-- Returns:
- Stylesheet
- Throws:
SAXExceptionIOException- See Also:
-