ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "W. Sean Hennessy" <shenne...@goldenhourdata.com>
Subject RE: XML, XSL, and Ant
Date Tue, 21 Oct 2003 20:34:12 GMT
Somewhere, like my-style.xsl, there is a declaration of the xsl namespace?
<xsl:stylesheet version="1.0" xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

-----Original Message-----
From: Kyle Adams [mailto:kadams@gfs.com] 
Sent: Tuesday, October 21, 2003 12:24 PM
To: user@ant.apache.org
Subject: XML, XSL, and Ant


I've got a stylesheet that I'm calling via <style>.  I'd like this stylesheet to include
an external entity (a snippet
of XSL).  Finally, I'd like to use <xmlcatalog> to resolve the entity to a location.

The simplified example:

my-style.xsl
===
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY templates PUBLIC "Snap Template Index" "file:index.ent"> ]> <xsl:stylesheet
version="1.0"> ... &templates; ...

index.ent
===
<xsl:import href="my-other-style.xsl"/>
<xsl:import href="her-style.xsl"/>
<xsl:import href="our-style.xsl"/>
...

build.xml
===
<style in="in.xml" out="out.xml" style="my-style.xsl">
    <xmlcatalog>
        <entity publicId="Snap Template Index" location="${env.SOME_HOME}/a/path/index.ent"/>
    </xmlcatalog>
</style>

My problem is that the external entity is not resolving properly.  On build I get:

    [style] : Fatal Error! java.io.FileNotFoundException: index.ent (The system cannot find
the file specified) Cause:
java.io.FileNotFoundException: index.ent (The system cannot find the file specified)

If I drop index.ent into the directory I'm running the build from, it find the file OK, so
it doesn't seem to be
utilizing the <xmlcatalog> the way I expected.  Even if it find index.ent, I get a bunch
of messages about "Element type
'xsl:xxxxx' must be declared," and my resulting XML document is mostly empty.

Can I even do what I want to do?  I'm getting the feeling I can't...

Kyle

_____

Kyle Adams | Java Developer  |  Gordon Food Service  |  616-717-6162


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message