ASP Error: 70
Description: Permission denied
Source: Microsoft VBScript runtime error

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

Using variables in extension elements

Subject: Using variables in extension elements
From: Roger I Martin PhD <hypernexdev@xxxxxxxxxxxxxxx>
Date: Mon, 31 Jan 2005 12:36:22 -0500
xml getattribute to variable
Hi folks,

<xsl:variable name="parameter-list">
<xsl:for-each select="../*[position()&gt;1]"><xsl:call-template name="set-argument">
<xsl:with-param name="current-variable">
<xsl:apply-templates select="." mode="parameter">
<xsl:with-param name="argument" select="true"/>
</xsl:apply-templates>
</xsl:with-param>
<xsl:with-param name="current-type" select="translate(@type,' ','')"/>
</xsl:call-template><xsl:if test="position()&lt;last()"><xsl:text>, </xsl:text></xsl:if>
</xsl:for-each>
</xsl:variable>
<mathmlx:put key="type-parameter-list" value="$parameter-list"/>


....
public void put(org.apache.xalan.extensions.XSLProcessorContext context,
org.apache.xalan.templates.ElemExtensionCall extElem) throws javax.xml.transform.TransformerException
{
String key = extElem.getAttribute("key");
String value = extElem.getAttribute("value");
if(value.startsWith("$"))
{
;
//extElem.
org.apache.xml.utils.QName qname=new org.apache.xml.utils.QName(value.substring(1));
//qname.
org.apache.xpath.VariableStack vs=context.getTransformer().getXPathContext().getVarStack();
for(int i=0;i<vs.size();i++)
{
//vs
System.out.println(vs.elementAt(i));
}
value=vs.getVariableOrParam(context.getTransformer().getXPathContext(), qname).toString();
System.out.println(value+" "+value.substring(1)+" "+value);
//value=extElem.getAttribute(value.substring(1));
}
table.put(key, value);
}
Trying to use the getVariableOrParam function to get the value of the variable to store for global use. Keep getting not resolvable. QName construction too simplistic? Name space issue? The for loop shows the last element has the value of 'parameter-list' so a suspect it is there.


Curiousity question: is anyone extending toward xslt 2.0 and xpath 2.0?

-Roger

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.