RE: AssocSS issue 15



> -----Original Message-----
> From: Simon Pieters [mailto:simonp@opera.com]
> Sent: Thursday, 2009 July 16 10:54
> To: Grosso, Paul; public-xml-core-wg@w3.org
> Subject: Re: AssocSS issue 15
> 
> On Thu, 16 Jul 2009 17:22:26 +0200, Grosso, Paul <pgrosso@ptc.com> wrote:
> 
> >
> >
> >> -----Original Message-----
> >> From: public-xml-core-wg-request@w3.org [mailto:public-xml-core-wg-
> >> request@w3.org] On Behalf Of Henry S. Thompson
> >> Sent: Wednesday, 2009 July 15 11:29
> >> To: public-xml-core-wg@w3.org
> >> Subject: Re: AssocSS issue 15
> >>
> >> ht writes:
> >>
> >> > Further to our discussion on the XML Core WG telcon today, I propose
> > a
> >> > modification of this, as suggested by Paul:
> >> >
> >> >      [1] StyleSheetPI ::= '<?xml-stylesheet' PIBody '?>'
> >> >                               [XSSC: XML PI]
> >> >
> >> >      [1a] PIBody      ::= (S PseudoAtt)* S?
> >> >
> >> >  Somewhere we then have this:
> >> >
> >> >    [XSSC: a StyleSheetPI *must* be an XML processing instruction
> >> >    (ref. REC-xml#NT-PI)]
> >>
> >> OK, so in the _subsequent_ discussion, we were leaning towards
> >> approaching this problem differently, by appeal to contextualisation
> >> in terms of where this spec. sits in the picture of XML processor and
> >> application provided by the XML spec. itself.
> >
> > And there was followup email discussing details of the wording.
> >
> > But back to the actual productions, my understanding is that our
> > current plan is to have a production [1] (with only one right hand
> > side) and a production [1a] something like what Henry shows above.
> >
> > However, to respond to Simon's issue about white space, I'm thinking
> > we could do something like:
> >
> >      [1] StyleSheetPI ::= '<?xml-stylesheet' S PIBody '?>'
> >
> >      [1a] PIBody      ::= PseudoAtt (S PseudoAtt)* S?
> >
> > This does match a smaller set of PIs than before.  In particular
> > <?xml-stylesheet?> used to match production [1] but would no longer
> > match my suggested production [1],
> 
> This can be solved by using (S PIBody)?

True.

> 
> > and <?xml-stylesheet ?> used to
> > match production [1] and [1a] as Henry writes above but would no
> > longer match my suggestion productions [1] and [1a].
> 
> This can be solved by using PseudoAtt? (S PseudoAtt)* S? (as I suggested
> in the earlier email).

I'm not sure.  If, when parsing, you skip PseudoAtt? because it is
optional, then the next thing you must find is S.  I guess it depends
how you read the BNF.  If you read this as DTD notation, I don't 
think this would work.  I'd think you need to say:

PIBody ::= S |
           PseudoAtt (S PseudoAtt)* S

I just didn't think it was worth it.

But I'm happy to let the WG decide what's best.

> 
> > On the other
> > hand, neither of those PIs are syntactically valid xml-stylesheet PIs
> > anyway because the href pseudo-attribute is #REQUIRED,
> 
> It is not per the errata. :-)

The type attribute is no longer required, but the errata do not
change the fact that the href attribute is required, as far as
I can tell.

> 
> > so it doesn't
> > bother me that they no longer are matched by productions [1] and [1a].
> >
> > Henry (and others), what do you think?
> 
> I don't understand the usefulness in having a production for the full PI
> as opposed to just the PI's data, since the XML spec gives the production
> for PIs in general, and since xml-stylesheet implementations will likely
> be on a layer above the XML parser and as such will just see the PI's
> target and data and not the source text.

We didn't want to change production [1] because there may be references
out there to it.  What we are trying to do is add a production for just
the PI contents that can be referenced by specs that wish to do so without
invalidating existing references to production [1].

paul

Received on Thursday, 16 July 2009 16:45:28 UTC