- From: Paul Grosso <pgrosso@arbortext.com>
- Date: Tue, 18 Jan 2005 12:52:53 -0500
- To: "Bert Bos" <bert@w3.org>
- Cc: <public-xml-core-wg@w3.org>
> From: public-xml-core-wg-request@w3.org On Behalf Of Richard Tobin > Sent: Tuesday, 18 January, 2005 8:30 > To: daniel@veillard.com; Bert Bos > Cc: public-xml-core-wg@w3.org > Subject: Re: XML Style Sheet PI and fragment IDs > > > Daniel said: > > There is a normative example as part of the XSLT-1.0 specification > > http://www.w3.org/TR/xslt#section-Embedding-Stylesheets > > As far as I know the conformant XSLT-1.0 processor should > > support that construct. > > Given that it's an example of the use of a different specification > (the Associating Style Sheets spec), I don't think it should be taken > to be a normative requirement of the XSLT spec. An XSLT > processor that > doesn't claim to support the Associating Style Sheets spec > doesn't need to support the xml-stylesheet PI at all. > > -- Richard No, but the Associating Style Sheets spec itself says: NOTE: Since the value of the href attribute is a URI reference, it may be a relative URI and it may contain a fragment identifier. In particular the URI reference may contain only a fragment identifier. Such a URI reference is a reference to a part of the document containing the xml-stylesheet processing instruction (see [RFC2396]). The consequence is that the xml-stylesheet processing instruction allows style sheets to be embedded in the same document as the xml-stylesheet processing instruction. So I think that's a pretty clear answer to Bert's question of what the spec was expecting. The xml-stylesheet spec was written before it was common to have conformance sections, so it's hard to say exactly what conformance to this spec means, but I'd say it seems clear that the spec did expect fragment identifiers to be allowed in the value of the href pseudo-attribute. As far as restrictions, I don't see any indication in the xml-stylesheet spec that it expected limitations. Of course, the xml-stylesheet spec also passes on the definition of most of its semantics to the HTML 4.0 link tag's definition. Nevertheless, the xml-stylesheet spec did go to fairly explicit lengths to make the href pseudo-attribute's value a URI reference including fragments, so I cannot see that this spec suggests any limitations. In particular: 1. I would think an href could use a fragment identifier on a URI reference that points to another document. 2. If the resource identified by the href value's URI ref is of type XML (whether the URI ref points to the local document or not), then I'd expect the fragment identifier to be an XPointer. 3. If the type pseudo-attribute's value is text/css, then I would expect the href URI reference to point either to something that could be parsed as an HTML <style> element or the contents of an HTML <style> element. If the (sub-)resource identified by the href URI ref contains anything else (e.g., other elements), I'd expect one would do whatever would happen if one found such things as children of the <style> element (which, since it can't happen, is presumably an error); but if the HTML WG wishes to say merely to ignore any such children, that would be fine too. I don't have a problem with the HTML group making further restrictions for use of the xml-stylesheet PI with respect to HTML/XHTML UAs as long as no one suggests such restrictions are derived from anything in the xml-stylesheet spec itself. Finally, I just stuck my neck out and said these things on my own. The XML Core WG may well disagree with me--we'll find out. paul
Received on Tuesday, 18 January 2005 17:53:28 UTC