It's a bit unlikely that your stylesheet will ever see the inside of a
schema validator, but yes, it's a reasonable objection that it's a bad idea
to use xsi:type as a literal attribute (perhaps there are XML editors that
would get upset by it). But changing it to use xsl:attribute leaves the
intent of the example intact, I think. An alternative would be to use a
namespace alias for "xsi".
Michael Kay
http://www.saxonica.com/
-----Original Message-----
From: Florent Georges [mailto:darkman_spam(_at_)yahoo(_dot_)fr]
Sent: 05 April 2006 19:02
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] QName as attribute value: how to be sure
the prefix will be bound?
Michael Kay wrote:
Example: Constructing a QName-Valued Attribute
http://www.w3.org/TR/xslt20/#creating-attributes
As simple as that. I don't find it :-(. Thanks.
In this example, a literal attribute is used. I personnaly used
xsl:attribute to create it, 'cause when we see the XSLT script as an
XML document, the 'data' element (in the example you pointed) has an
@xsi:type saying it is an integer:
<data xsi:type="xs:integer"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<xsl:namespace name="xs"
select="'http://www.w3.org/2001/XMLSchema'"/>
<xsl:text>42</xsl:text>
</data>
but its content is a complex content. What do you think?
Thanks for the response. Regards,
--drkm
______________________________________________________________
_____________
Nouveau : téléphonez moins cher avec Yahoo! Messenger !
Découvez les tarifs exceptionnels pour appeler la France et
l'international.
Téléchargez sur http://fr.messenger.yahoo.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>
--~--
--~------------------------------------------------------------------
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>
--~--