Subject: Importing DTD file in to an xsl
Posted By: venkatragh82 Post Date: 8/11/2008 7:57:15 AM
Is there any way to include/import a DTD file in to an xsl file?

Thanks
Venkat

Reply By: Martin Honnen Reply Date: 8/11/2008 8:03:25 AM
An XSLT stylesheet is XML so you can use the normal XML mechanisms like

<!DOCTYPE xsl:stylesheet SYSTEM "stylesheet.dtd">
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
...
</xsl:stylesheet>



--
  Martin Honnen
  Microsoft MVP - XML
Reply By: venkatragh82 Reply Date: 8/11/2008 10:05:50 AM
Mnay Thanks, i will check this.

quote:
Originally posted by Martin Honnen

An XSLT stylesheet is XML so you can use the normal XML mechanisms like

<!DOCTYPE xsl:stylesheet SYSTEM "stylesheet.dtd">
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
...
</xsl:stylesheet>



--
  Martin Honnen
  Microsoft MVP - XML



Reply By: venkatragh82 Reply Date: 8/11/2008 10:18:57 AM
I want to include/import the doctype in the following way.

folder1
    folder2
       folder3

I have a xsl file at folder3 and the dtd file at folder1. I need to include the dtd (at folder1) in to the xsl file (at folder3). Can you help me in this regard. I tried this way and it did not work:

<!DOCTYPE xsl:stylesheet SYSTEM "../../stylesheet.dtd">

Thanks
quote:
Originally posted by venkatragh82

Mnay Thanks, i will check this.

quote:
Originally posted by Martin Honnen

An XSLT stylesheet is XML so you can use the normal XML mechanisms like

<!DOCTYPE xsl:stylesheet SYSTEM "stylesheet.dtd">
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
...
</xsl:stylesheet>



--
  Martin Honnen
  Microsoft MVP - XML







Reply By: Martin Honnen Reply Date: 8/11/2008 10:22:49 AM
The path "../../stylesheet.dtd" seems fine for the folder structure you describe. What does "it did not work" mean exactly? Which parser/XSLT processor exactly do you use in which way, which error message exactlyy do you get?

--
  Martin Honnen
  Microsoft MVP - XML
Reply By: venkatragh82 Reply Date: 8/11/2008 10:51:09 AM
Am using xalan 2.0. When i run the part of code i mentioed you earlier, the xsl searches only for one director behind ... that is up to folder2. It does not search the dtd file in folder1. Am i explaining better?

quote:
Originally posted by Martin Honnen

The path "../../stylesheet.dtd" seems fine for the folder structure you describe. What does "it did not work" mean exactly? Which parser/XSLT processor exactly do you use in which way, which error message exactlyy do you get?

--
  Martin Honnen
  Microsoft MVP - XML



Reply By: Martin Honnen Reply Date: 8/11/2008 10:58:17 AM
I am not sure how to help further. Test whether the issue is specific to Xalan (by trying a different prococessor like Saxon), if so ask on a Xalan user list.

--
  Martin Honnen
  Microsoft MVP - XML
Reply By: venkatragh82 Reply Date: 8/11/2008 11:02:34 AM
Thanks, i will check with them

quote:
Originally posted by Martin Honnen

I am not sure how to help further. Test whether the issue is specific to Xalan (by trying a different prococessor like Saxon), if so ask on a Xalan user list.

--
  Martin Honnen
  Microsoft MVP - XML



Reply By: venkatragh82 Reply Date: 8/12/2008 2:35:10 AM
Is it possible to include a dtd file that is not in my Application package. That is ...

C:
  folder1
     splChar.dtd
  .
  .
  .
  MyAppfolder
    ..
     ..
      myXslFolder
         myXsl.xsl

Is it possible to include splChar.dtd (from outside the package) in to myXsl.xsl?

quote:
Originally posted by Martin Honnen

I am not sure how to help further. Test whether the issue is specific to Xalan (by trying a different prococessor like Saxon), if so ask on a Xalan user list.

--
  Martin Honnen
  Microsoft MVP - XML




Go to topic 73222

Return to index page 1