OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   RE: [xml-dev] [newbie] Mapping a Map 101?

[ Lists Home | Date Index | Thread Index ]

> > I wouldn't rely on sibling relationships.
> Ok. Why would relying on such relationships be a "bad" thing though? 
> What are the benefits of introducing an <entry> tag in the <dict> 
> structure?

It makes the processing code much more clear.


<xsl:value-of select="entry[key=$p]/value"/>


<xsl:value-of select="key[.=$p]/following-sibling::*[1]"/>

It's also more extensible.

If you use an XQuery implementation that doesn't support the sibling axes,
then the version that relies on sibling relationships is going to be really
hard work to process. (Some XQuery vendors have been very resistant to
providing the sibling and ancestor axes.)

Michael Kay


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS