From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Wed Dec 22 1999 - 05:04:11 EST
On Wed, Dec 22, 1999 at 01:55:43AM +0100, Mathias Hasselmann wrote:
> 
> libxml currently seems not to recognise processing instructions  
> (REC-XML 1.0, 1998-02-10, Chapter 2.6): 
> 
> »»» cut »»»
> 
> Processing Instructions
> 
> [16] PI       ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
> [17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))
> 
> ««« cut «««
> 
> That's a problem for XSLT parsers: XML document with embedded
> stylesheets have
> to start with:
> 
> <?xml-stylesheet type="text/xml" href="#style1"?>
> 
> (This instructs a XSLT-Parser to search for an element of the type
>  <xsl:stylesheet> or <xsl:translation> with id="style1".)
> 
> The current implementation of libxml denies parsing of such documents
> with the following error messages:
> 
> »»» cut »»»
> 
> [mathias@sam examples]$ tester embedded-stylesheet.xml 
> embedded-stylesheet.xml:1: error: Blank needed after '<?xml'
> <?xml-stylesheet type="text/xml" href="#style1"?>
>      ^
> embedded-stylesheet.xml:1: error: Blank needed here
> <?xml-stylesheet type="text/xml" href="#style1"?>
>      ^
> embedded-stylesheet.xml:1: error: parsing XML declaration: '?>' expected
> <?xml-stylesheet type="text/xml" href="#style1"?>
>      ^
> [mathias@sam examples]$ 
  Right, but the XML spec clearly state taht any PI starting with XML
(upper or lower case) is in the reserved space for W3C specifications.
  So I initially blocked those,
  My gut feeling is that this should at least cause a warning if the
name is not one of those allowed by some of the W3C specs. I will 
patch this,
Daniel
-- Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes | Today's Bookmarks : Tel : +33 476 615 257 | 655, avenue de l'Europe | Linux XML libxml WWW Fax : +33 476 615 207 | 38330 Montbonnot FRANCE | Gnome rpm2html rpmfind http://www.w3.org/People/all#veillard%40w3.org | RPM badminton Kaffe ---- Message from the list xml@xmlsoft.org Archived at : http://xmlsoft.org/messages/ to unsubscribe: echo "unsubscribe xml" | mail majordomo@xmlsoft.org
This archive was generated by hypermail 2b29 : Wed Aug 02 2000 - 12:29:56 EDT