xsl-list
[Top] [All Lists]

RE: String evaluation problem

2005-10-19 04:50:22
This one made me chuckle (sorry!), because it's so imaginative.
Unfortunately the processing model is completely different from the way you
are imagining it. Entity definitions in the stylesheet are expanded by the
XML parser before XSLT gets to see the stylesheet. The XSLT processor
doesn't know that any entities ever existed.

It's just about possible (though not at all convenient) to generate an
entity reference in the result document that's expanded using the entities
defined in the DTD of the result document, when the result document comes to
be used. But really, XSLT and entities aren't very happy bedfellows.

Michael Kay
http://www.saxonica.com/ 

-----Original Message-----
From: Fadi Qutaishat [mailto:fadi_taher2000(_at_)yahoo(_dot_)com] 
Sent: 19 October 2005 11:54
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] String evaluation problem

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('&amp;',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.

Any Ideas ?

Many thanks,
Fadi 


      
              
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

--~------------------------------------------------------------------
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>
--~--





--~------------------------------------------------------------------
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>