RE: [xsl] Reading the DocType in XSL

Subject: RE: [xsl] Reading the DocType in XSL
From: "Yates, Danny (ANTS)" <danny.yates@xxxxxxxxxx>
Date: Mon, 24 Feb 2003 13:39:17 -0000
Hi,

I've just had to do something similar. My approach was to parse
the document (using DOM) and extract the DOCTYPE. Then we map
doctypes to stylesheets, and pass the DOM tree and correct
stylesheet to the processor. In this manner, we have many
stylesheets (one per doctype). This might work for you, or you
might prefer to pass the doctype into a master stylesheet as a
parameter.

Rgds,

Dan.

-----Original Message-----
From: Gary Lawrence Murphy [mailto:garym@xxxxxxxxxx]
Sent: 20 February 2003 17:52
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] Reading the DocType in XSL



I've poked about in google, but the nature of the terms makes this
a hard one for robots to find:  Is it possible for XSL to detect the
SystemID given in the <!DOCTYPE> tag?

This maybe something that is processor-specific, but it seems odd that
I can read comments but I cannot find any reference to XSL making use
of the DOCTYPE information -- we have an application where we'd like
to have modular shared stylesheets where we can apply the same root
XSL to the XML (like fo/docbook.xsl) but have modules selected and
configured depending on DOCTYPE attributes (eg the DocBook version)

(our application is actually SportsML, so the DocBook analogy may not
be perfect ;)

Is there a way to make the System or Public ID known inside the XSL?

-- 
Gary Lawrence Murphy - garym@xxxxxxxxxxx - TeleDynamics Communications
   - blog: http://www.teledyn.com/mt/ - biz: http://teledyn.com/ -
  "Computers are useless. They can only give you answers." (Picasso)

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


***************************************************************************
This communication (including any attachments) contains confidential information.  If you are not the intended recipient and you have received this communication in error, you should destroy it without copying, disclosing or otherwise using its contents.  Please notify the sender immediately of the error.

Internet communications are not necessarily secure and may be intercepted or changed after they are sent.  Abbey National Treasury Services plc does not accept liability for any loss you may suffer as a result of interception or any liability for such changes.  If you wish to confirm the origin or content of this communication, please contact the sender by using an alternative means of communication.

This communication does not create or modify any contract and, unless otherwise stated, is not intended to be contractually binding.

Abbey National Treasury Services plc. Registered Office:  Abbey National House, 2 Triton Square, Regents Place, London NW1 3AN.  Registered in England under Company Registration Number: 2338548.  Regulated by the Financial Services Authority (FSA).
***************************************************************************


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread