[xml] Processing Instructions

Date view Thread view Subject view Author view

From: Mathias Hasselmann (Mathias.Hasselmann@gmx.de)
Date: Tue Dec 21 1999 - 19:55:43 EST


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]$

««« cut «««

Ciao,
Mathias

-- 
WWW: http://www.arco.de/~mhasselm/ http://www.dominanz-haus.de/
PGP-Fingerprint: 4D15 89ED 7299 6428 FEE6  C66F 5D40 6504 55E5 72F3
----
Message from the list xml@xmlsoft.org
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@xmlsoft.org


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Aug 02 2000 - 12:29:56 EDT