Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: attribute

From: samuel <samuel.braikeh@-----.--->
To: NULL
Date: 7/7/2009 12:09:00 PM
On 7 juil, 19:40, Martin Honnen <mahotr...@yahoo.de> wrote:
> samuel wrote:
> > hello!
> > look, i can write this, it works:
> > =A0 =A0 =A0 =A0 =A0 =A0<xsl:attribute name=3D"name"><xsl:value-of selec=
t=3D"titre"/></
> > xsl:attribute>
>
> > but this:
> > =A0 =A0 =A0 =A0 =A0 =A0<xsl:attribute name=3D"name"><strong><xsl:value-=
of select=3D"titre"/></
> > strong></xsl:attribute>
> > doesn't work...
> > and neither does it when i try tu put some <xsl:text> =A0</xsl:text>
> > around <strong> and </strong>.
>
> What exactly is it that you want to achieve? An attribute can't contain
> elements so why are you trying to put an element like that 'strong'
> element into the attribute? The processor will either raise an error or
> ignore that element, seehttp://www.w3.org/TR/xslt#creating-attributes:
>
> =A0 =A0"Creating nodes other than text nodes during the instantiation of =
the
> content of the xsl:attribute element; implementations may either signal
> the error or ignore the offending nodes."
>
> Can you show us the XML or HTML you want the stylesheet to create? Or is
> that not XML you want to create?
>
> --
>
> =A0 =A0 =A0 =A0 Martin Honnen --- MVP XML
> =A0 =A0 =A0 =A0http://msmvps.com/blogs/martin_honnen/
what i want to obtain is something like that (for a lightbox):
<a href=3D"images/bd/1.jpg"
    rel=3D"lightbox[1]"
    title=3D"Le chat du rabbin,1.La Bar-Mitsva"
    name=3D"<div>
            <p><strong>Le chat du rabbin<br/>
               <em>1.La Bar-Mitsva</em></strong>
           </p>
           <p>Joann Sfar <em>(Sc=E9nario et Dessin)</em>
           <br/>Brigitte Findakly <em>(Couleur)</em>
           <br/>Dargaud, Poisson Pilote
           <br/>2002
           <br/><img src=3D'images/notes/5.jpg'/>
           <br/><a
href=3D'http://www.bedetheque.com/serie-2313-BD-Chat-du-Rabbin-
(Le).html#8847'>
                lien</a>
           </p>
         </div>
         <div id=3D'en_bas'>
           <a class=3D'comm'
              onclick=3D'return open_comms(\"bd\",1);'
              href=3D'#'>Commentaires()</a>
         </div>"
      ><img src=3D"images/bd/mini/1.jpg" alt=3D""/></a>

my xml document:
<root>
<liste name=3D"sfar_chat">
<bd id=3D"1">
	<titre dt=3D"1.La Bar-Mitsva">Le chat du rabbin</titre>
	<auteur dt=3D"Sc=E9nario et Dessin">Joann Sfar</auteur>
	<auteur dt=3D"Couleur">Brigitte Findakly</auteur>
	<auteur>Dargaud, Poisson Pilote</auteur>
	<note>5</note>
	<date>2002</date>
	<lien>http://www.bedetheque.com/serie-2313-BD-Chat-du-Rabbin-
(Le).html#8847</lien>
</bd>
...
</liste></root>

my xsl document just now:
<?xml version=3D"1.0" encoding=3D"ISO-8859-1"?>
<xsl:stylesheet version=3D"1.0" xmlns:xsl=3D"http://www.w3.org/1999/XSL/
Transform">


<xsl:template match=3D"/">

<xsl:for-each select=3D"root/liste">
	<xsl:for-each select=3D"bd">
	<xsl:sort select=3D"@id"/>
	<a href=3D"images/bd/{../@name}/{@id}.jpg" rel=3D"lightbox[{../@name}]"
title=3D"{titre}" alt=3D"{titre}">
		<xsl:attribute name=3D"name">   ?????????????    </xsl:attribute>


	<xsl:if test=3D"@id=3D1"><img src=3D"images/bd/mini/{../@name}.jpg"/></
xsl:if>
	</a>
	</xsl:for-each>
</xsl:for-each>

</xsl:template>
</xsl:stylesheet>

thanks!


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent