cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <gree...@hotmail.com>
Subject Re: XML processing instruction starting with "[xX][mM][lL]"
Date Sat, 08 Apr 2000 14:20:14 GMT

Kees Jongenburger <keesj@office.netlinq.nl> wrote:

>i an earlyer post to comp.text.xml i got a reply
>stating that XML recomendation does not alow processing instruction
>starting with XML.
>look at :http://www.w3.org/TR/1998/REC-xml-19980210#sec-pi

If you want to be really really picky, the XML spec conflicts with the 
association spec:

http://www.w3.org/1999/06/REC-xml-stylesheet-19990629/

because the XML spec says 'Names beginning with the string "xml", or any 
string which would match (('X'|'x') ('M'|'m') ('L'|'l')), are reserved for 
standardization in this or future versions of this specification.'

but the association spec is not part of the XML spec, so it declares an 
illegal XML PI!

Someone has made a mistake here (maybe it's me). However, since the 
association spec is a W3C recommendation, and is in wide use, it appears to 
be a "de facto" bug in xml4j. Nothing to do with cocoon. For now, just use a 
different parser.

>now i have the folowing example witch i want to parse using xml4j
>
><?xml version="1.0"?>
><?xml-stylesheet href="/xsl/main.xsl" type="text/xsl"?>
><?cocoon-process type="xslt"?>
>
><page author="Kees Jongenburger" title="Kees Jongenburger" >
></page>
>
>this wil give me the error that processing instruction starting with
>"[xX][mM][lL]" are not alowed (how strange :))
>B
>at the moment is a woking around it like this:
><xsl:processing-instruction name="xml-stylesheet">href="/xsl/main.xsl" 
>type="text/xsl"</xsl:processing-instruction>
>are the to methods equivalent?

Well, no. The second allows dynamic parameterization, the first does not. 
The second should not be necessary in your case.

>is that the right way?
>wil the first method be removed if the future?

As it is a W3 recommendation, probably not.

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


Mime
View raw message