Subject: RE: [xsl] QName as attribute value: how to be sure the prefix will be bound? From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Wed, 5 Apr 2006 19:19:08 +0100 |
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@xxxxxxxx] > Sent: 05 April 2006 19:02 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > 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 : tiliphonez moins cher avec Yahoo! Messenger ! > Dicouvez les tarifs exceptionnels pour appeler la France et > l'international. > Tilichargez sur http://fr.messenger.yahoo.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] QName as attribute value:, Florent Georges | Thread | [xsl] Man Page Transform and Modes, Michael B Allen |
RE: [xsl] QName as attribute value:, Florent Georges | Date | [xsl] Man Page Transform and Modes, Michael B Allen |
Month |