[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Cannot process a result tree fragment as a node-set un

Subject: Cannot process a result tree fragment as a node-set under XSLT 1.0 - My alternative don´t function
From: "Alejandro" <alexcontini@xxxxxxxx>
Date: Sat, 12 Apr 2008 13:05:09 +0100
 Cannot process a result tree fragment as a node-set un
Hello, i want to recover any records in function of one variable (option in this case), and i donB4t know to do it. I want to print the TITULO element the those records.
Can you help me, please?


********************************* XML *************************************

<?xml version="1.0"?>


<TITULO>Exposicion de pintura</TITULO>

<TITULO>Inaguracion de ...</TITULO>

<TITULO>Clausura de ..</TITULO>


********************** XSL **********************

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:i18n="http://apache.org/cocoon/i18n/2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common"
extension-element-prefixes="exsl" version="1.0">

<xsl:output method="html" media-type="text/html;charset=iso-8859-1" indent="yes" encoding="ISO-8859-1" omit-xml-declaration="yes" />

<xsl:variable name="date1" select="20080205000000"></xsl:variable>
<xsl:variable name="date2" select="20080211000000"></xsl:variable>
<xsl:variable name="option" select="1"></xsl:variable>

<xsl:template match="/">

<xsl:text disable-output-escaping="yes"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">]]></xsl:text>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es">

<title>Gabinete of Prensa</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />


<xsl:variable name="filter">
<xsl:when test="$option=1">
<xsl:copy-of select="//RecursoEx1[F_FIN=$date1 and contains(TITULO,'o')]"/></xsl:when>
<xsl:copy-of select="//RecursoEx1[F_FIN=$date2]"/></xsl:otherwise>

<p>Number: <xsl:value-of select="count(exsl:node-set($filter))"/></p> <!-- DON'T FUNCTION -->

<xsl:for-each select="exsl:node-set($filter)">
<p><xsl:value-of select="exsl:node-set($filter)/TITULO"/></p> <!-- DON'T FUNCTION -->



Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.