[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Cannot process a result tree fragment as a node-se
Hi Martin,
ItB4s correct. I want to count the RecursoEx1 elements <p>Number: <xsl:value-of select="count(exsl:node-set($filter)/RecursoEx1)"/></p> although with your sample document and stylesheet variables that count is 0. OK!! I want to iterate over the RecursoEx1 elements <xsl:for-each select="exsl:node-set($filter)/RecursoEx1"> OK!! Martin: and exsl:node-set, it looks to me as if that might not be necessary at all.But it is not clear what you want to achieve and why you use xsl:copy-of I use xsl:copy-of and exsl:node-set because to error "Cannot process a result tree fragment as a node-set under XSLT 1.0" if i code : <xsl:variable name="filtro"> <xsl:choose> <xsl:when test="$option=1"> <xsl:copy-of select="//RecursoEx1[F_FIN=$date1]"/></xsl:when> <xsl:otherwise> <xsl:copy-of select="//RecursoEx1[F_FIN=$date2]"/></xsl:otherwise> </xsl:choose> </xsl:variable> <p>Number: <xsl:value-of select="$filter"/></p> <xsl:for-each select="$filter"> <p><xsl:value-of select="TITULO"/></p> </xsl:for-each> and i donB4t know if exits another posibility. Exists?? The variable "option" is to received from one formulary, but there are more and then the "filter" will be dynamic. How can i do to construct the filter dynamic? For example, i receive one varible named "title" from the formulary with the value: "John Martin Car Monday" and i like to enumerate the RecursoEx1 elements that meet with this condition: TITLE=John or TITLE=Martin or TITLE=Car or TITLE=Monday. or title variable is Apple Pencil, ..... then the condition will be TITLE=Apple or TITLE=Pencil i donB4t know how may parameters i will receive in advance Fine Thanks, Alexander PD: My english is very bad :) ----- Mensaje original ----- De: "Martin Honnen" <Martin.Honnen@xxxxxx> Para: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Enviado: sC!bado, 12 de abril de 2008 13:32 Asunto: Re: Cannot process a result tree fragment as a node-set under XSLT 1.0 - My alternative donB4t function Alejandro wrote:
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|