Loading ...
Sorry, an error occurred while loading the content.

Re: [XSL-FO] DTD'S WITH XSL

Expand Messages
  • G. Ken Holman
    ... Perhaps you are confused in your terminology. I m not sure what you mean by simple pages linking to external DTDs . Do you mean XML documents with a
    Message 1 of 6 , Oct 11, 2001
    • 0 Attachment
      At 01/10/11 13:54 +0100, Birney, Kenneth wrote:
      >ive been learnign aboutxml and have been producing simple pages linking to
      >external dtd's. i was looking at sum examples on the web with xml using xsl
      >to style it. These examplesdidnt use DTD's, so does xsl make dtds
      >unnessecarry?

      Perhaps you are confused in your terminology. I'm not sure what you mean
      by "simple pages linking to external DTDs". Do you mean XML documents with
      a document type declaration to an external declaration subset?

      A DTD (Document Type Definition) describes the grammar of the elements and
      attributes allowed for an instance of XML. This particular grammar can be
      used to supplement the information set of an XML document (the processed
      result of looking at XML syntax). The syntax of the grammar language
      itself is inherited from SGML and is different than XML instance syntax.

      A RELAX-NG grammar is in XML syntax and is used to constrain or validate
      the elements and attributes allowed in an instance of XML. RELAX-NG does
      not affect the information set of an XML document. Its development is
      based upon sound theoretical principles.

      A W3C XML Schema is in XML syntax and works only on the information set of
      an XML document, not on the raw syntax.

      For some people, RELAX-NG is far more promising than W3C XML Schema.

      XSLT works on the information set of an XML document as described by the
      data model of XPath and its tree of nodes. XSLT predates W3C XML
      Schema. So, from my description above, the DTD is very necessary if it has
      information supplementing the information set of an XML document (most
      typically, the names of ID-typed attributes and defaulted attributes).

      But such ATTLIST declarations are all that is necessary, as XPath ignores
      content model ELEMENT declarations in the DTD. You can have well-formed
      XML with declaration subsets of only ATTLIST declarations to "teach" the
      XSLT processor about these supplemental additions to your document model.

      Not only are you not obliged to give the XSLT processor ELEMENT content
      model declarations, even if you did so they will be ignored. XSLT works
      only with the XPath structure which itself works only with the information
      present in an XML instance and appropriate ATTLIST declarations of any
      supplied DTD made up of declarations found both internal and external to
      the document itself.

      I hope this helps.

      ......................... Ken


      --
      G. Ken Holman mailto:gkholman@...
      Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/
      Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995)
      Web site: XSL/XML/DSSSL/SGML/OmniMark services, training, products.
      Book: Practical Transformation Using XSLT and XPath ISBN 1-894049-06-3
      Article: What is XSLT? http://www.xml.com/pub/2000/08/holman/index.html
      Next public instructor-led training: 2001-10-11,10-22,11-01,11-02,
      - 11-05,11-19,12-09,12-10
    Your message has been successfully submitted and would be delivered to recipients shortly.