[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XML tags as map keys and impact on XSLT/XPath

Subject: Re: XML tags as map keys and impact on XSLT/XPath
From: Mukul Gandhi <gandhi.mukul@xxxxxxxxx>
Date: Fri, 18 Jun 2010 12:16:46 +0530
Re:  XML tags as map keys and impact on XSLT/XPath
On Fri, Jun 18, 2010 at 11:58 AM, Wolfgang Laun <wolfgang.laun@xxxxxxxxx>
wrote:
> Every now and then, people (not me) want to represent a Map<K,V> in XML by
using
> s.th. like
> B  <map>
> B  B  <k1>v1</k1>
> B  B  <k2>v2</k2>
> B  B  ...
> B  </map>

I would prefer a structure like below:

<map>
   <entry>
      <key>k1</key>
      <value>v1</value>
   </entry>
   <entry>
      <key>k2</key>
      <value>v2</value>
   </entry>
</map>

your example would fail, if say there's a key like:
<1k>v1</1k>

(because, "1k" is not a valid XML name)


--
Regards,
Mukul Gandhi

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.