You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Juan Jose Pablos <ch...@che-che.com> on 2004/04/24 23:18:45 UTC

document('file.xml') and entity resolver

Hi there,
I am just wondering if on a transformation say:

<map:transform src="welcome.xslt">

Added this line:
    <xsl:value-of select="document('book-cocoon.xml')"/>


to load this file:

cheche@yarel:~/xml/cocoon-2.1/build/webapp$ more book-cocoon.xml
<?xml version="1.0"?>
<!DOCTYPE book PUBLIC
         "-//APACHE//DTD Cocoon Documentation Book V1.0//EN"
         "book-cocoon-v10.dtd">
<book/>



should resolve that DTD, or this exception is normal:

WARN    (2004-04-24) 22:44.04:492   [core.xslt-processor] (/) 
PoolThread-4/TraxErrorHandler: Error in TraxTransformer: 
file:/home/cheche/xml/cocoon-2.1/build/webapp/welcome.xslt; Line 7; 
Column 59;
; SystemID: file:/home/cheche/xml/cocoon-2.1/build/webapp/welcome.xslt; 
Line#: 7; Column#: 59
javax.xml.transform.TransformerException: No se puede cargar el doc 
solicitado: /home/cheche/xml/cocoon-2.1/build/webapp/skinconfig-v06.dtd 
(No such file or directory)



Thank you!


Cheers,
Cheche


Re: document('file.xml') and entity resolver

Posted by David Crossley <cr...@apache.org>.
This issue has been raised a number of times, most recently
on the users list a few days ago [1].

Even though the use of document() function is not ideal,
it should still be supported.

The bug seems to show that the catalog entity resolver
is not being used via whatever parser that reads the
included xml document.

The xml parser that is used to read the xslt file itself is fine
- see the test described at [1].

I am trying to do some research into the problem but have not
made much progress yet.

[1] http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=108242715027646

--David

Juan Jose Pablos wrote:
> Hi there,
> I am just wondering if on a transformation say:
> 
> <map:transform src="welcome.xslt">
> 
> Added this line:
>     <xsl:value-of select="document('book-cocoon.xml')"/>
> 
> 
> to load this file:
> 
> cheche@yarel:~/xml/cocoon-2.1/build/webapp$ more book-cocoon.xml
> <?xml version="1.0"?>
> <!DOCTYPE book PUBLIC
>          "-//APACHE//DTD Cocoon Documentation Book V1.0//EN"
>          "book-cocoon-v10.dtd">
> <book/>
> 
> 
> 
> should resolve that DTD, or this exception is normal:
> 
> WARN    (2004-04-24) 22:44.04:492   [core.xslt-processor] (/) 
> PoolThread-4/TraxErrorHandler: Error in TraxTransformer: 
> file:/home/cheche/xml/cocoon-2.1/build/webapp/welcome.xslt; Line 7; 
> Column 59;
> ; SystemID: file:/home/cheche/xml/cocoon-2.1/build/webapp/welcome.xslt; 
> Line#: 7; Column#: 59
> javax.xml.transform.TransformerException: No se puede cargar el doc 
> solicitado: /home/cheche/xml/cocoon-2.1/build/webapp/skinconfig-v06.dtd 
> (No such file or directory)
> 
> 
> 
> Thank you!
> 
> 
> Cheers,
> Cheche


Re: document('file.xml') and entity resolver

Posted by Upayavira <uv...@upaya.co.uk>.
I can't say for sure, but I do remember hearing that the entity resolver 
isn't used within the document() function, which would explain your problem.

Regards, Upayavira

Juan Jose Pablos wrote:

> Hi there,
> I am just wondering if on a transformation say:
>
> <map:transform src="welcome.xslt">
>
> Added this line:
>    <xsl:value-of select="document('book-cocoon.xml')"/>
>
>
> to load this file:
>
> cheche@yarel:~/xml/cocoon-2.1/build/webapp$ more book-cocoon.xml
> <?xml version="1.0"?>
> <!DOCTYPE book PUBLIC
>         "-//APACHE//DTD Cocoon Documentation Book V1.0//EN"
>         "book-cocoon-v10.dtd">
> <book/>
>
>
>
> should resolve that DTD, or this exception is normal:
>
> WARN    (2004-04-24) 22:44.04:492   [core.xslt-processor] (/) 
> PoolThread-4/TraxErrorHandler: Error in TraxTransformer: 
> file:/home/cheche/xml/cocoon-2.1/build/webapp/welcome.xslt; Line 7; 
> Column 59;
> ; SystemID: 
> file:/home/cheche/xml/cocoon-2.1/build/webapp/welcome.xslt; Line#: 7; 
> Column#: 59
> javax.xml.transform.TransformerException: No se puede cargar el doc 
> solicitado: 
> /home/cheche/xml/cocoon-2.1/build/webapp/skinconfig-v06.dtd (No such 
> file or directory)
>
>
>
> Thank you!
>
>
> Cheers,
> Cheche
>
>