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

Re: String evaluation problem

Subject: Re: String evaluation problem
From: andrew welch <andrew.j.welch@xxxxxxxxx>
Date: Wed, 19 Oct 2005 12:00:06 +0100
Re:  String evaluation problem
On 10/19/05, Fadi Qutaishat <fadi_taher2000@xxxxxxxxx> 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....

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.