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

RE: 2 values for an attribute?

Subject: RE: 2 values for an attribute?
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Wed, 13 Aug 2003 08:01:46 +0100
RE:  2 values for an attribute?
> 
> Is it possible for a single element to have two values for 
> one attribute? 

No.

> For example (two total guesses for <e>)
> 
> <x>
> 	<e value="1|2">Some text</e>
> 	<e value="1" value="2">Some text</e>
> </x>

In your first example the attribute has a single value, "1|2". You can
interpret that value any way you like. If you want the value of the
attribute to be a list then it's more common (and supported by XML
Schema) to use a space as the separator.
> 
> Or is the only solution to double up on data like this (as 
> one example)
> 
> <x>
> 	<e value="1">Some text</e>
> 	<e value="2">Some text</e>
> </x>

Holding data redundantly is a bad idea. A much better solution is to
switch from using attributes to using child elements.

I can't quite see what this has to do with XSLT?

Michael Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.