Re: What's So Great about SAX? (ie. Future Indecisions)
by Robin Berjon other posts by this author
Oct 9 2002 8:49AM messages near this date
view in the new Beta List Site
RE: What's So Great about SAX? (ie. Future Indecisions)
|
Re: RE: What's So Great about SAX? (ie. Future Indecisions)
Grant McLean wrote:
> From: Robin Berjon [mailto:robin.berjon@[...].fr]
> >I see mostly one reason to prefer clarkian notation over
> >normalisation, it's an ugly reason but it's unfortunately a real
> >one: QNames in content. That filter won't be able to update it.
>
> Can you give an example of the 'QNames in content' phenomenon?
> (I'm not trying to propose a fix, I'd just like to understand the
> problem better).
As Eric pointed out, what's probably the most frequent example is XPath
within XSLT. <xsl:template match='foo:bar'> , with foo mapped to
http://foo/, will match any bar in that namespace. If you read the XSLT
spec carefully, you'll see there are a good number of other places where
QNames occur in attribute content, including some you might not expect.
Another frequent example people have to live with is XML Schema, with
many such occurances. The problem is that you can't have a generic
filter that will know when to change content and when not. Take the
following example (from a horrible language, but still):
<simpleType name='Foo.ST'>
<restriction base='bar:SuperType.ST'>
<enumeration value='bar:one'/>
<enumeration value='bar:two'/>
<enumeration value='bar:three'/>
</restriction>
</simpleType>
It just so happens here that if you're processing this document to
normalise that silly "bar" prefix to the obviously better "baz" prefix,
you will break the document if you *don't* change its occurence in
'bar:SuperType.ST' and you will break the document if you *do* change it
in the enumerations.
--
Robin Berjon <robin.berjon@[...].fr>
Research Engineer, Expway
7FC0 6F5F D864 EFB8 08CE 8E74 58E6 D5DB 4889 2488
_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Grant McLean
Robin Berjon
Eric Bohlman
Robin Berjon
|