 |
| XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

August 11th, 2008, 07:57 AM
|
|
Authorized User
|
|
Join Date: Jul 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Importing DTD file in to an xsl
Is there any way to include/import a DTD file in to an xsl file?
Thanks
Venkat
|
|

August 11th, 2008, 08:03 AM
|
|
Friend of Wrox
|
|
Join Date: Nov 2007
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts
|
|
An XSLT stylesheet is XML so you can use the normal XML mechanisms like
Code:
<!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
|
|

August 11th, 2008, 10:05 AM
|
|
Authorized User
|
|
Join Date: Jul 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Mnay Thanks, i will check this.
Quote:
quote:Originally posted by Martin Honnen
An XSLT stylesheet is XML so you can use the normal XML mechanisms like
Code:
<!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
|
|
|

August 11th, 2008, 10:18 AM
|
|
Authorized User
|
|
Join Date: Jul 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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:
quote:Originally posted by venkatragh82
Mnay Thanks, i will check this.
Quote:
quote:Originally posted by Martin Honnen
An XSLT stylesheet is XML so you can use the normal XML mechanisms like
Code:
<!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
|
|
|
|

August 11th, 2008, 10:22 AM
|
|
Friend of Wrox
|
|
Join Date: Nov 2007
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts
|
|
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
|
|

August 11th, 2008, 10:51 AM
|
|
Authorized User
|
|
Join Date: Jul 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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:
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
|
|
|

August 11th, 2008, 10:58 AM
|
|
Friend of Wrox
|
|
Join Date: Nov 2007
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts
|
|
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
|
|

August 11th, 2008, 11:02 AM
|
|
Authorized User
|
|
Join Date: Jul 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks, i will check with them
Quote:
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
|
|
|

August 12th, 2008, 02:35 AM
|
|
Authorized User
|
|
Join Date: Jul 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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:
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
|
|
|
 |