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
Hi folks,
<xsl:variable name="parameter-list"> <xsl:for-each select="../*[position()>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()<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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








