|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] DTD/xsl:import
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








