Accessing the DTD
DTDs are not in the XPath data model. DTDs are not well-formed XML.
Ken Holman added: In Annex F of XSLT you will see the wish list includes "support for DTDs in the Data Model" which is what you want.
Access to the DTD
In XSL, you don't have access to the source document's DTD.
How can I create a DTD using the Oracle parser
Creating a DTD is done with: DOMParser d = new DOMParser(); d.parseDTD(xxx); DTD myDTD = d.getDoctype(); Where "xxx" can be one of: InputStream InputSource Reader String URL You can then: d.setDoctype(myDTD); to set and cache that DTD as the one to use for this instance of the parser.