ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: xslt processing and style ant task
Date Thu, 15 Jul 2004 15:01:20 GMT
> From: Nicolas Mailhot [mailto:Nicolas.Mailhot@laPoste.net]
> > It's not Xalan or Saxon that need to be XInclude-aware, but the XML
> > parser you are using.
> 
> Well, I'm using xerces-j2 2.6.2 which is supposed to be fairly recent.
> 
> Or are you telling me the xerces people have no XInclude support nor are
> planning for one ?

Well, I'm no Xerces expert. Does Xerces list support for XInclude?
Maybe it supports it, but it's disabled by default!?

If I were you, I'd try a Xerces only test reading an XML document
with XInclude'd files, and dump it on disk, and see if Xerces resolved
the includes. This takes out Ant or the XSL processor of the equation.

Also, search in archives. I remember posts from the past mentioning
adding XInclude support to Ant itself (or something like that).

> Short-term I can work around this using the following
> stylesheet (since I only need the most basic of XInclude support now)
> but that means yet another bunch of intermediary files I have to track.
> 
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>                 xmlns:xi="http://www.w3.org/2003/XInclude"
>                 version="1.0">
>   <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
>   <xsl:template match="*">
>     <xsl:copy>
>       <xsl:apply-templates select="@*"/>
>       <xsl:apply-templates select="*"/>
>     </xsl:copy>
>   </xsl:template>
>   <xsl:template match="@*">
>     <xsl:copy/>
>   </xsl:template>
>   <xsl:template match="xi:include">
>     <xsl:apply-templates select="document(@href)/*"/>
>   </xsl:template>
> </xsl:stylesheet>

Nice ;-) And thanks, I'll keep that handy. --DD

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


Mime
View raw message