- From: Simon Pieters <simonp@opera.com>
- Date: Thu, 16 Jul 2009 08:45:42 +0200
- To: "Henry S. Thompson" <ht@inf.ed.ac.uk>, public-xml-core-wg@w3.org
On Wed, 01 Jul 2009 19:42:09 +0200, Henry S. Thompson <ht@inf.ed.ac.uk>
wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Grosso, Paul writes:
>
>> ACTION to Henry: Propose a solution to issue 15 (the productions)
>> in email, possibly using a xref to the XML spec itself.
>
> Issue 15 reads:
>
> 15. Modify the grammar productions
>
> Change production [1] to only include the processing instruction's
> data and not the leading "<?xml-stylesheet " or trailing "?>"
> . This would allow reuse of the syntax for other specs
> (e.g.. XBL2). Also, an xml-stylesheet processor would generally
> only see the PI contents after the XML parser has parsed it as an
> XML PI.
>
> Production [1] looks like this:
>
> [1] StyleSheetPI ::= '<?xml-stylesheet' (S PseudoAtt)* S? '?>'
>
> The relevant part of the XML spec is here [2]:
>
> Processing Instructions
>
> [16] PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
> [17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))
>
> PIs are not part of the document's character data, but MUST be
> passed through to the application. The PI begins with a target
> (PITarget) used to identify the application to which the
> instruction is directed. The target names " XML ", " xml ", and so
> on are reserved for standardization in this or future versions of
> this specification. The XML Notation mechanism may be used for
> formal declaration of PI targets. Parameter entity references MUST
> NOT be recognized within processing instructions.
>
> I think what we should do is move towards something like the
> following:
>
> [1] StyleSheetPI ::= PI (linked to REC-xml#NT-PI)
> ::= '<?xml-stylesheet' PIBody '?>'
> [That is, an xml-stylesheet processing
> instruction *must* satisfy _both_ productions]
>
> [1a] PIBody ::= (S PseudoAtt)* S?
>
> . . .
>
> This has the advantage of retaining the anchor in the existing spec.
I prefer the second option because it more closely matches what an
implementor would implement.
> We could alternatively try doing something with prose:
>
> [Definition: An *xml-stylesheet processing instruction* is an XML
> processing instruction (ref. REC-xml#NT-PI) whose PITarget is
> 'xml-stylesheet' and the remainder of whose content satisfies the
> following BNF:
"The remainder of whose content" is a bit unclear. Is it the remaining
characters in the source stream, or the 'data' of the ProcessinInstruction
object that the XML parser emits? I think we should define this in terms
of the latter.
> [1] PIBody ::= (S PseudoAtt)* S?
>
> . . .
>
> where the definition would have NT-StyleSheetPI as its name, to catch
> existing references to the first production.
As I said in a previous email, this production would have to be slightly
different because we don't want to require leading whitespace in the PI's
data.
http://www.w3.org/mid/op.uvy4x5lgidj3kv@simon-pieterss-macbook.local
--
Simon Pieters
Opera Software
Received on Thursday, 16 July 2009 06:46:37 UTC