Re: [xslt] Xpath commands inside attributes
- From: "http://www.pas-world.com" <dev001 pas-world com>
- To: The Gnome XSLT library mailing-list <xslt gnome org>
- Subject: Re: [xslt] Xpath commands inside attributes
- Date: Tue, 08 Jan 2008 15:42:23 +0100
Do not work for me with XSL like this:
<xsl:variable name="test" select="valor"/>
<xsl:for-each select="items/datos">
<xsl:sort select="@fecha"/>
<tr>
<td>
<input name="item_db_ids[]" type="checkbox" id="item_db_ids"
tipo="input" class="[required:true]" value="{$test}"/>
...
result of this (->transformToXml) is:
...
<input name="item_db_ids[]" type="checkbox" id="item_db_ids"
tipo="input" class="[required:true]" value=""/>
...
value attribute has not value, should be "valor", null or empty seems.
If I replace {$test} with {sum(1+1)}, stop with any warning or any
results, using {count(..)} return a value of 1. With {position()} works
fine return 1,2,3,..
El mar, 08-01-2008 a las 21:19 +0800, Brett Zamir escribió:
> One more common tip you might miss...
>
> If you are using entities (in your XML or XSL), add something like the
> following before loading:
>
> $xml = new DOMDocument;
> $xml->resolveExternals = true;
> $xml->substituteEntities = true;
> $xml->loadXML($xmlstring);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]