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

Attribute value templates aren't substituted in extens

Subject: Attribute value templates aren't substituted in extensionelements by xalan-j
From: Mulberry Technologies List Owner<xsl-list-owner@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 28 Jan 2002 12:03:41 -0500
xslt attribute value templates
>Date: Mon, 28 Jan 2002 12:57:14 +0100 (CET)
>From: Massimo Santini - mailing list address <mm14ss@xxxxxxxx>
>Sender: <santini@xxxxxxxxxxxxxxxxxxxx>
>To: <XSL-List@xxxxxxxxxxxxxxxxxxxxxx>
>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@xxxxxxxxxxxxxxxx
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


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.