This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: How to declare a param which name is in a XML file?


hi

ok at first u should 
end ur param tags in ur xml file (i wonder u didnt get any errors here)

<parameters>
  <param ident="param1"></param>
  <param ident="param2"></param>
</parameters>

then go to ur xsl file and change your second <for each select> with
<value-of>

<xsl:template match="parameters">
                <xsl:for-each select="param">
                        <xsl:value-of select="@ident"/> 
                </xsl:for-each>
</xsl:template>

this works for me (cocoon) ... u didnt get an output because u only
selected
elements but never showed them with value-of



greets 
michael

btw.... i suggest u to read some tutorials or books :-)


Cesar Hernandez Fuente wrote:
> 
> I have a XML file with a parameter definition zone.
> 
> <parameters>
>   <param ident="param1">
>   <param ident="param2">
> </parameters>
> 
> And i want to apply a XSLT file to this XML file
> 
> XSLT File
> 
>         <xsl:template match="parameters">
>                 <xsl:for-each select="param">
>                         <xsl:param name="@ident"/>
>                 </xsl:for-each>
>         </xsl:template>
> 
> But when XSLT-parser(SAXON) processes it, shows this error:
> 
>         "Name @ident contains invalid characters"
> 
> How should i solve this problem??
> 
> Thanks!


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]