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

Subject: Re: [xsl] XML tags as map keys and impact on XSLT/XPath
From: "Joe Fawcett" <joefawcett@xxxxxxxxxxx>
Date: Fri, 18 Jun 2010 12:25:38 +0100
Wolfgang

Well design of XML to be XSLT friendly is probably in scope.

The problem with having the value as an attribute is that there can be problems with quote marks. I also find working with large text blocks fiddly if they are attributes. Obviously a lot depends on what range of values you are expecting and if the files ever need to be worked on 'by hand'.


Joe http://joe.fawcett.name/

--------------------------------------------------
From: "Wolfgang Laun" <wolfgang.laun@xxxxxxxxx>
Sent: Friday, June 18, 2010 12:14 PM
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [xsl] XML tags as map keys and impact on XSLT/XPath

OK, folks - thank you all; you have given me what I was asking for,
and I now see clearly the potential impact on XSLT.

(As I wrote, this is not an XML list; therefore discussing basic XML
techniques was not my intent.)

-W

On 18 June 2010 13:06, Mukul Gandhi <gandhi.mukul@xxxxxxxxx> wrote:
On Fri, Jun 18, 2010 at 1:49 PM, Andrew Welch <andrew.j.welch@xxxxxxxxx> wrote:
A less limiting approach is:

<map key=" " value=" "/>

If the value is an element only or mixed content, then having an attribute for value is I think ruled-out.

Then in that case, either we select Joe's solution or perhaps
something like what I wrote :)

If values are atomic, then your solution is fine.



--
Regards,
Mukul Gandhi

Current Thread