Re: string-calculated entity reference

Subject: Re: string-calculated entity reference
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 14 Dec 1999 11:40:31 GMT
> i want something like &x; where x is calculated to be a or b.
> is this possible?

No, you probably want to use xsl variables, not xml entities.
Remember, the entities are expanded by the xml parser before
xsl ever sees your stylesheet, so the xsl system does not
know there were any entities at all, so has no hope of switching between
them. 

Of course you can do the switch at the xml parse level:

That is you can have
<!ENTITY x "&a;">

and then use &x; but to switch x to being b you have to change the
entity declaration.

David


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread