This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: XInclude, XSLTProc, and entityref
- From: Daniel Veillard <veillard at redhat dot com>
- To: Jeff Beal <jeff dot beal at ansys dot com>
- Cc: "DocBook Mailing List (E-mail)" <docbook-apps at lists dot oasis-open dot org>
- Date: Thu, 30 Jan 2003 10:43:11 -0500
- Subject: Re: DOCBOOK-APPS: XInclude, XSLTProc, and entityref
- References: <E08C8F26F6901D42B1201763D125853815B4C3@ntdevexc.win.ansys.com>
- Reply-to: veillard at redhat dot com
On Thu, Jan 30, 2003 at 09:57:44AM -0500, Jeff Beal wrote:
> I'm trying to use XSLTProc to "flatten" a file using XInclude, then pass
> this file through Saxon to create my online help. I first used just the
> xmllint parser to parse the file, and noticed that none of the graphic
> entities were declared, so I decided to write an XSLT stylesheet to convert
> all entityrefs to filerefs. This stylesheet works perfectly on the
> XIncluded files themselves, but it fails to resolve the entityrefs on the
> same files when they are XIncluded into a larger document. I end up with a
> bunch of fileref="" in my resulting XML file. The weird thing is that all
> entityrefs resolve normally when using the DocBook stylesheets.
>
> My template in question is:
> <xsl:template match="@entityref">
> <xsl:attribute name="fileref">
> <xsl:value-of select="unparsed-entity-uri(.)"/>
> </xsl:attribute>
> </xsl:template>
>
> Can anybody see what it is that I'm doing wrong?
Hum, I smell some kind of bug/problem where the entity definitions from the
XIncluded files are not available in the resulting document being transformed.
As a result unparsed-entity-uri() which look for those in the document DTD
ends up generating an empty strings.
Can you bugzilla this with a minimal test case, instructions at
http://xmlsoft.org/XSLT/bugs.html
thanks,
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/