XSLT access to the dtd

DTD

1. Accessing the DTD
2. Access to the DTD
3. How can I create a DTD using the Oracle parser

1.

Accessing the DTD

Mike Brown

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.

2.

Access to the DTD

Mike Brown

In XSL, you don't have access to the source document's DTD.

            

3.

How can I create a DTD using the Oracle parser

Steve Muench

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.