This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
DTD/xsl:import
- To: xsl-list at mulberrytech dot com
- Subject: DTD/xsl:import
- From: mxmodi at duke-energy dot com
- Date: Mon, 6 Nov 2000 15:49:33 -0600
- Reply-To: xsl-list at mulberrytech dot com
Hi,
I am sure this problem has come up before for someone...and I looked under
DTD and <xsl:import> and <xsl:include> on the FAQ for a solution. Maybe I
am just not thinking like the rest of you and can't find a solution to what
I am trying to do. Here is the problem I am having.
I have my XML's and XSL's in different directories in a file structure.
Within my XSL's, I refer to the same path several times for my host
machine. I want to put this information in a separate XML file and read
from it into the current XSL that is being parsed.
A sample XML file I am working on:
<root>
<Names>
<Name>
<FN>aaa</FN>
<LN>bbb</LN>
</Name>
</Names>
</root>
A sample XSL:
<?xml version="1.0"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY rootdir SYSTEM "http://sdangel03/tms/">
]>
<xsl:template match="/">
...perform some code...
<img><xsl:attribute name="src">
&rootdir;images/name.gif</xsl:attribute></img>
<xsl:apply-templates select="//Names/Name" >
<xsl:sort select="FN" />
</xsl:apply-templates>
</xsl:template>
When I run this on Saxon, the &rootdir; is not picked up as a string. What
am I missing?
Also in the above <!ENTITY rootdir>, I would like to formulate the string
dynamically from a XML file using the document() function. I am not having
toomuch luck with that either. Any help. The sample XML for that is as
follows:
<MESSAGE>
<CONFIG>
<FILES>
<SERVER>sdangel03</SERVER>
<PATH>tms</PATH>
</FILES>
<SERVLET>
<SERVER>jjdamukaitis01</SERVER>
<PORT>7001</PORT>
</SERVLET>
</CONFIG>
</MESSAGE>
Thanks to anyone who can help or point me to the right part of the FAQ. I
am pretty sure someone has asked this Q before.
Maulik
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list