This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

dealing with doctype dtd's


    Thank you very much to the people on this list who've taken the time to
rectify my misunderstandings about what xslt is and what it does.

    I am changing xml documents to slightly different xml documents, and now
I'm stuck on transferring the DOCTYPE which may or may not be present.  I
can output a predetermined, static doctype as in:

 <xsl:output method="xml" indent="yes" doctype-system="sample.dtd"/>  

But I would like to be able to identify the existing doctype in the original
xml, and output it in the new XML without changing it, or omit it altogether
if it does not exist.

For instance one xslt should take in from XML1.xml:
<?xml version="1.0"?>
 <!DOCTYPE record SYSTEM "sample1.dtd">
one time, and the next time from XML2.xml:
 <?xml version="1.0"?>
<!DOCTYPE record SYSTEM "sample2.dtd">

and then spit out what it took in each time.  

How can I access the doctype in xslt?  And if the doctype file specified
doesn't exist on the machine this xslt is run on, can it be ignored without
halting the transformation?

I am using ie5.0 with the msxml3 parser, and have no option to switch.  Do I
need to resort to using javascript or can this be done with xslt?

Thank you for your time,
Chris

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]