You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ali Mesbah <al...@West.NL> on 2003/06/09 14:00:08 UTC

Document function

Hi all,
I'm getting a strange "XML Parsing Error: syntax error" from Cocoon while I try
to transform an XML document with an XSLT which uses the Document function. 

XSLT (metaoutput.xsl):
<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="xml" indent="yes"/>
  <xsl:strip-space elements="*"/>

  <xsl:variable name='fileurl' select='"mapping/vorm.xml"'/>
  <xsl:variable name='mapping' select='document($fileurl)/mapping'/>

 ...

Error:
XML Parsing Error: syntax error
Location: http://localhost:8888/metaoutput
Line Number 2, Column 1:

There is no Error message logged. This is what I get on the browser. 
Does it have something to do with Xalan? Any ideas?

Thanks,
Ali

-- 
-- Ali Mesbah, West Consulting B.V., www.west.nl, +31 15 2191600

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: Document function

Posted by al...@West.NL.
Hello Joerg,
I am using 2.1 and indeed XSLTC is the default processor.
I changed it to Xalan and it works great. Thanks alot.

Ali

> what Cocoon version do you use - or if you know, do you use XSLTC or
> Xalan? There seems to be a bug for top level xsl:variable and document()
>  when using XSLTC:
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20381.
>
> XSLTC is the default processor in 2.1, while it is Xalan in 2.0. You can
>  switch between both.
>
> Joerg
>
> Ali Mesbah wrote:
>> Hi all,
>> I'm getting a strange "XML Parsing Error: syntax error" from Cocoon
>> while I try to transform an XML document with an XSLT which uses the
>> Document function.
>>
>> XSLT (metaoutput.xsl):
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <xsl:stylesheet version="1.0"
>>   xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>>   <xsl:output method="xml" indent="yes"/>
>>   <xsl:strip-space elements="*"/>
>>
>>   <xsl:variable name='fileurl' select='"mapping/vorm.xml"'/>
>>   <xsl:variable name='mapping' select='document($fileurl)/mapping'/>
>>
>>  ...
>>
>> Error:
>> XML Parsing Error: syntax error
>> Location: http://localhost:8888/metaoutput
>> Line Number 2, Column 1:
>>
>> There is no Error message logged. This is what I get on the browser.
>> Does it have something to do with Xalan? Any ideas?
>>
>> Thanks,
>> Ali
>
>
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: Document function

Posted by Joerg Heinicke <jo...@gmx.de>.
Hello Ali,

what Cocoon version do you use - or if you know, do you use XSLTC or 
Xalan? There seems to be a bug for top level xsl:variable and document() 
when using XSLTC: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20381.

XSLTC is the default processor in 2.1, while it is Xalan in 2.0. You can 
switch between both.

Joerg

Ali Mesbah wrote:
> Hi all,
> I'm getting a strange "XML Parsing Error: syntax error" from Cocoon while I try
> to transform an XML document with an XSLT which uses the Document function. 
> 
> XSLT (metaoutput.xsl):
> <?xml version="1.0" encoding="UTF-8"?>
> 
> <xsl:stylesheet version="1.0"
>   xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>   <xsl:output method="xml" indent="yes"/>
>   <xsl:strip-space elements="*"/>
> 
>   <xsl:variable name='fileurl' select='"mapping/vorm.xml"'/>
>   <xsl:variable name='mapping' select='document($fileurl)/mapping'/>
> 
>  ...
> 
> Error:
> XML Parsing Error: syntax error
> Location: http://localhost:8888/metaoutput
> Line Number 2, Column 1:
> 
> There is no Error message logged. This is what I get on the browser. 
> Does it have something to do with Xalan? Any ideas?
> 
> Thanks,
> Ali


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: Document function

Posted by Joerg Heinicke <jo...@gmx.de>.
Hello Alexander,

that's not /really/ true ;-) document() works, but there are some issues 
with it like the caching bug: 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10203.

Joerg

Alexander Schatten wrote:
> Ali Mesbah wrote:
> 
>> Hi all,
>> I'm getting a strange "XML Parsing Error: syntax error" from Cocoon 
>> while I try
>> to transform an XML document with an XSLT which uses the Document 
>> function.  
>>
> I am not very sure about it, but as far as I remember: the document 
> function does not work with Cocoon, and, btw, it is not necessary either.
> 
> have a look at the XInclude and CInclude Trasformers for example
> 
> 
> alex


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: Document function

Posted by Alexander Schatten <al...@gmx.at>.
Ali Mesbah wrote:

>Hi all,
>I'm getting a strange "XML Parsing Error: syntax error" from Cocoon while I try
>to transform an XML document with an XSLT which uses the Document function. 
>  
>
I am not very sure about it, but as far as I remember: the document 
function does not work with Cocoon, and, btw, it is not necessary either.

have a look at the XInclude and CInclude Trasformers for example


alex


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org