xsl-list
[Top] [All Lists]

Re: String evaluation problem

2005-10-19 04:00:06
On 10/19/05, Fadi Qutaishat <fadi_taher2000(_at_)yahoo(_dot_)com> wrote:
Hi all,

I have the following situation:

<?xml version="1.0"?>

<!DOCTYPE xsl:stylesheet [
<!ENTITY continue1 "general explanations">
 ]>


<xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

<xsl:template match="login">
<test><xsl:value-of

select="concat('&',substring('continue(1)',1,8),substring('continue(1)',10,1),';')"/></test>

</xsl:template>
</xsl:stylesheet>

The output would be <test>&continue1;</test> but it
does not get evaluated to be "general explanations" as
defined in the above !DOCTYPE.

That's because you are creating the string '&continue1;' in the result
tree - if you wanted it to be expanded in the stylesheet you would
need to have the entity '&continue1' in the stylesheet when it's
parsed eg:

<xsl:template match="login">
  <test>&continue1;</test>

There's probably a better way to achieve what you are trying to do, so
maybe post another question stating what you are trying to achieve,
rather than asking how to get there using the route you've chosen....

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>