To have a literal, you need to have the @select like select= "'valor'" with apostrophes instead of the quotation marks... Otherwise it looks for an element called valor within the context

Brett

http://www.pas-world.com wrote:
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);


_______________________________________________
xslt mailing list, project page http://xmlsoft.org/XSLT/
[email protected]
http://mail.gnome.org/mailman/listinfo/xslt

_______________________________________________
xslt mailing list, project page http://xmlsoft.org/XSLT/
[email protected]
http://mail.gnome.org/mailman/listinfo/xslt

Reply via email to