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 ]
  • To: xml-dev@lists.xml.org
  • Subject: Re: [xml-dev] [newbie] Mapping a Map 101?
  • From: PA <petite.abeille@gmail.com>
  • Date: Mon, 13 Dec 2004 16:04:38 +0100
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:return-path:mime-version:in-reply-to:references:content-type:message-id:content-transfer-encoding:from:subject:date:to:x-mailer; b=CI0IQT4ulQcKoqp0OeHXNg9FTYhjlXuoZGrot5xVafJVCf50whvaExYXizQH5ys/6YxEMcRaZdNANyhslL1eaBJig8E5p1vgDp32Ct6FfGeLb9F73jxcNUYalMRTjwPaTB1Nw95BaVoIKxpOE9w+y2jf78nXRjNKHndcrE7RVDU=
  • In-reply-to: <E1Cdqus-00064D-00@ukmail1.eechost.net>
  • References: <E1Cdqus-00064D-00@ukmail1.eechost.net>

On Dec 13, 2004, at 15:11, Michael Kay wrote:

>>> 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.

I see. Make sense. Thanks for the clarification :)

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

Out of curiosity, if <dict> was simply defined as an ordered sequence 
of elements, where the even elements are the keys and the odd elements 
the values, how would the XQuery look like?





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

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