Class XMLSourceFactory

java.lang.Object
wt.util.xml.xslt.XMLSourceFactory

public abstract class XMLSourceFactory extends Object
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
  • Method Details

    • getFactory

      public static XMLSourceFactory getFactory()
      Create an instance of the defauly implementation provided with Windchill.

      Supported API: true
      Returns:
      XMLSourceFactory
    • newURLSource

      public URLXMLSource newURLSource(URL url)
      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

      public URLXMLSource newURLSource(URL url, String baseURI)
      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

      public URLXMLSource newURLSource(File file) throws MalformedURLException
      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

      public DOMXMLSource newDOMSource(Node node)
      Create a new DOMXMLSource for the provided DOM Node. The base URI will be undefined. This may cause the XSLT function document() 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

      public DOMXMLSource newDOMSource(Node node, String baseURI)
      Create a new DOMXMLSource for the provided DOM Node and base URI. Use of the XSLT function document() 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

      public StreamXMLSource newStreamSource(InputStream inputStream)
      Create a new StreamXMLSource for the provided InputStream. The base URI will be undefined. This may cause the XSLT function document() 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

      public StreamXMLSource newStreamSource(InputStream inputStream, String baseURI)
      Create a new StreamXMLSource for the provided InputStream and base URI. Use of the XSLT function document() 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

      public ReaderXMLSource newReaderSource(Reader reader)
      Create a new ReaderXMLSource for the provided Reader. The base URI will be undefined. This may cause the XSLT function document() 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

      public ReaderXMLSource newReaderSource(Reader reader, String baseURI)
      Create a new ReaderXMLSource for the provided Reader and base URI. Use of the XSLT function document() 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:
      SAXException
      IOException
      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:
      SAXException
      IOException
      See Also:
    • newStylesheet

      public abstract Stylesheet newStylesheet(XMLSource xslSource) throws SAXException, IOException
      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:
      SAXException
      IOException
      See Also: