xsl-list
[Top] [All Lists]

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

2010-06-18 01:48:56
Wolfgang

In my opinion that's definitely a poor way for two main reasons. One is selecting the elements, the other is actual names of keys, element names are limited much more than attribute values.

<map>
 <key name="k1">v1</key>
 <key name="k2">v2</key>
</map>

allows a much larger selection of key names and also makes selecting all elements more efficient, either using the key function or just 'map/key' rather than 'map/*' without making selecting key specific ones any more difficult.

Joe
http://joe.fawcett.name/

--------------------------------------------------
From: "Wolfgang Laun" <wolfgang(_dot_)laun(_at_)gmail(_dot_)com>
Sent: Friday, June 18, 2010 7:28 AM
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Subject: [xsl] XML tags as map keys and impact on XSLT/XPath

Every now and then, people (not me) want to represent a Map<K,V> in XML by using
s.th. like
  <map>
    <k1>v1</k1>
    <k2>v2</k2>
    ...
  </map>
with ki from K and vi from V. Apart from the obvious limitation for K's values, I feel that this is somehow violating the spirit of XML. But this is not a list
for XML, and I don't want to risk a red or yellow card.

So, more specifically: Doesn't such a "structure" complicate the writing
of XSLT constructs? Aren't there any statements or expressions that
won't be usable at all? (I don't need an exhaustive list of what isn't
possible - I'm more interested in a general judgment.)

Thanks
-W

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--