[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

DTD/xsl:import

Subject: DTD/xsl:import
From: mxmodi@xxxxxxxxxxxxxxx
Date: Mon, 6 Nov 2000 15:49:33 -0600
import dtd
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.