[jcifs] XSLT

Eric eglass1 at comcast.net
Thu May 27 23:47:19 GMT 2004


>>I don't know if this is conformant to the XSLT spec or not; I suspect this
>>is
>>done to accommodate browsers that don't convert & --> & when
>>parsing the URL maybe?
> 
> 
> That's rather unfoutunate. I'm using -//W3C//DTD HTML 4.01
> Transitional//EN DTD and the W3C validator is complaining about the
> unescaped &s. Something's gotta give.
> 
> 

Julian is correct; this is a Xalan bug.  You could try Saxon 
(saxon.sourceforge.net).

>>>Another problem I have is that passing params into the transform does
>>>not appear to work.
>>
>>I know Xalan does, and it appears to work properly with the Ant style
>>task (using Ant 1.6.1, results may vary for older versions):
>>
>><style style="test.xsl" in="test.xml" out="testout.xml">
>>    <param name="myparam" expression="myvalue"/>
>></style>
>>
>>Then just declare "myparam" in the stylesheet:
>>
>><xsl:param name="myparam" select="''"/>
> 
> 
> That works. I didn't have the select="''". What is that all about? I know
> passing params isn't standard but I didn't have to do that with XT.
> 

I just gave the parameter an empty default value.  Actually that's the 
default if no value is specified, so you could do:

<xsl:param name="myparam"/>

with the same effect.  I just got into the habit of explicitly putting 
an empty value in, because I'd often go back and fill in a default value.

Xalan requires that the parameter be declared; I'm not sure about XT, or 
if it's mandated by the spec or not.


Eric





More information about the jcifs mailing list