Hi and thanks for your reply,

I should have shown the param I am using:

<xsl:param name="anchor_idref" select="''"/>

This produces the bug I mention below.

I am (quickly) trying to ensure that my app works in as many processors as
possible. I have downloaded the latest Xalan, but using it in a servlet
container and have to deal with class loading (I guess) and have not yet...

It does work in Saxon, jd.xslt[1], and Caucho's Resin XSL processor (similar
to XSLTC).

Best,
-Rob

[1] jd.xslt has a bug|feature where it unexpectedly wraps the following in
CDATA, so:

<style type="text/css" media="all">@import "<xsl:value-of
select="$relative_path"/>css/default.css";</style>

produces:

<style type="text/css" media="all"><[EMAIL PROTECTED]
"css/default.css";]]></style>

Which means the browser won't bring down the CSS.


> -----Original Message-----
> From: Foxy Shadis [mailto:[EMAIL PROTECTED]
> Sent: Sunday, August 03, 2003 9:51 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> 
> You should use params of the form:
> 
> <xsl:param name="blah" select="'...'"/>
> or
> <xsl:param name="blah">...</xsl:param>
> 
> or always pushing a default value in from the calling app. If you wish it
> to
> be blank, set it to "''", and if you want an empty node-set, set it to
> "/..". $blah='' is true, because an empty node-set (the default with no
> select) is normalized to ''. Use not($blah and $blah='') to test for this.
> (This fails if $blah is 'false', '0', or other boolean false indicators.
> More robust methods can be found online.)
> 
> Foxy
> 
> 
> >From: "Robert Koberg" <[EMAIL PROTECTED]>
> >Reply-To: [EMAIL PROTECTED]
> >To: <[EMAIL PROTECTED]>
> >Subject: bug? test="not($anchor_idref='')"
> >Date: Sun, 3 Aug 2003 08:20:02 -0700
> >
> >Hi,
> >
> >I am doing a test on a global xsl:param to see if it contains a string or
> >nothing. The snippet below evaluates to true when no value is being
> passed
> >into the anchor_idref param. If this is not the proper way to test for
> >something like this, what is?
> >
> ><!-- custom handling of anchors for our cms' link tags -->
> >function checkAnchor() {
> >   <xsl:if test="not($anchor_idref='')">
> >   if (null!=<xsl:value-of select="$anchor_idref"/>) {
> >     <xsl:value-of select="$anchor_idref"/>.scrollIntoView();
> >   }
> >   </xsl:if>
> >}
> >
> >I am using:
> >
> >$ java -version
> >java version "1.4.1_03"
> >Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_03-b02)
> >Java HotSpot(TM) Client VM (build 1.4.1_03-b02, mixed mode)
> >
> >And:
> >
> >org.apache.xerces.jaxp.SAXParser
> >org.apache.xalan.processor.TransformerFactoryImpl
> >
> >thanks,
> >-Rob
> >
> 
> _________________________________________________________________
> Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page�atures/featuredemail

Reply via email to