- From: Jim Ley <jim@jibbering.com>
- Date: Mon, 18 Nov 2002 17:15:09 -0000
- To: <www-svg@w3.org>
"Robin Berjon" <robin.berjon@expway.fr> > Jim Ley wrote: >> "Tobias Reif" <tobiasreif@pinkjuice.com> wrote in message >> news:3DD9166A.9000601@pinkjuice.com... >>>Kurt Cagle wrote: >>>>I'd think strongly about implementing XPath 2.0 >>> >>>This would be very useful, save lots of code, and ease maintenace. >> >>The syntax surely can't use the namespace prefix to make a judgement - >>what would happen in the following situation: >> >><g xmlns:ex="urn:moo"> >><rect x="0" y="0" height="10" width="10" ex:type="stepBox"/> >><rect x="20" y="20" height="10" width="10" ex:type="stepBox"/> >></g> >> >>then if I insert another rect >><rect x="10" y="10" width="10" height="10" ex:type="stepBox" >>xmlns:ex="urn:min"/> >> >>that surely can't respond to the mouseover events too? > >Of course not. Presumably, prefixes in the XPath expressions would be >mapped to namespaces based on the current namespace context, as >it is in XSLT. and if that namespace context changed? My problem with using the prefix, is that the prefix is supposed to disappear once you've parsed the XML, which would mean your (//rect[@ex:type='stepBox']).mouseover would have to be expanded to: (//rect[@urn:moo:type='stepBox']).mouseover on parsing, which means why bother with the extra confusing layer - why not just work with the namespace direct? Jim.
Received on Monday, 18 November 2002 12:18:03 UTC