This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Attribute value templates aren't substituted in extensionelements by xalan-j



>Date: Mon, 28 Jan 2002 12:57:14 +0100 (CET)
>From: Massimo Santini - mailing list address <mm14ss@yahoo.it>
>Sender: <santini@spillane.localdomain>
>To: <XSL-List@lists.mulberrytech.com>
>Subject: Attribute value templates aren't substituted in extension elements
> by xalan-j
>
>I'm using the following style sheet (see the bottom of the mail) with
>Xalan (version 2.2.0 java, from XML Apache) and from the docs I've read
>(mainly http://www.w3.org/TR/xslt#attribute-value-templates, but also the
>FAQs and HOWTOs reported on xml.apache.org site) I was expecting a result
>like
>
>	var = VALUE
>	get returns VALUE
>	<other:element value="VALUE"/>
>
>but instead I got
>
>	var = VALUE
>	get returns {$var}
>	<other:element value="VALUE"/>
>
>as if "{$var}" is not substituted in extension elements. What am I missing
>here? Any help will be appreciated...
>
>	Massimo Santini
>
><?xml version="1.0"?>
>
><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>                xmlns:lxslt="http://xml.apache.org/xslt";
>                xmlns:ext="ext"
>                extension-element-prefixes="ext"
>                version="1.0">
>
><lxslt:component prefix="ext" elements="set" functions="get">
>
>	<lxslt:script lang="javascript">
>
>		var t = "";
>
>		function set( xp, e )
>		{
>			t = e.getAttribute( "value" );
>			return null;
>		}
>
>		function get()
>		{
>			return t;
>		}
>		</lxslt:script>
>
></lxslt:component>
>
><xsl:variable name="var" select="'VALUE'"/>
>
><xsl:template match="/">
>
>	var = <xsl:value-of select="$var"/>
>
>	<ext:set value="{$var}"/>
>	get returns <xsl:copy-of select="ext:get()"/>
>
>	<other:element value="{$var}"/>
>
></xsl:template>
>
></xsl:stylesheet>


-- 
======================================================================
B. Tommie Usdin                        mailto:btusdin@mulberrytech.com
Mulberry Technologies, Inc.                http://www.mulberrytech.com  
17 West Jefferson Street                           Phone: 301/315-9631
Suite 207                                    Direct Line: 301/315-9634
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML              
======================================================================

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]