Subject: Re: [xsl] How to retrieve global parameters names and their default values using Saxon? From: Abel Braaksma Online <abel.online@xxxxxxxxx> Date: Wed, 10 May 2006 15:36:42 +0200 |
A. <xsl:param name="somenameA" select=" 'literal-string-A' " /> B. <xsl:param name="somenameB" >literal-string-B</xsl:param>
rootContext = compiledStylesheet.getRootContext(); if(ParamB.canEvaluateToString()) return ParamB.evaluateToString(rootContext); else return null;
Cheers, Abel
compiledStylesheet = stf.newTemplates(new StreamSource(stylesheetPath)); Executable exec = ((PreparedStylesheet)compiledStylesheet).getExecutable();
IntHashMap map = exec.getCompiledGlobalVariables();
Iterator iter = map.valueIterator();
while (iter.hasNext()) {
Object var = iter.next();
if (var instanceof GlobalParam) {
String name = ((GlobalParam)var).getVariableName();
String value = ((GlobalParam)var).getSelectExpression().toString();
cheers andrew
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] How to retrieve global pa, Michael Kay | Thread | Re: [xsl] How to retrieve global pa, George Cristian Bina |
RE: [xsl] processing source XML whi, Michael Kay | Date | Re: [xsl] How to retrieve global pa, George Cristian Bina |
Month |