xsl-list
[Top] [All Lists]

Re: unix problems

2002-11-19 14:48:33
Yes, which version is it? If it is an older one (2.2.x), I will know one more example for conversion problems. You can also force the type conversions:

test="not(boolean(number(string-length($demoValue[(_at_)value='valid']))=0))"

But I would use one of the two shorter versions

test="string($demoValue[(_at_)value = 'valid'])"
test="normalize-space($demoValue[(_at_)value = 'valid'])"

where the first one does the same like yours. The second one removes leading and trailing spaces and reduces multiple spaces to one space (space means all space characters: http://www.w3.org/TR/REC-xml#NT-S). So the difference is only with nodes containing only space characters.

Regards,

Joerg

Laura wrote:
so would this mean that this is a bug in XALAN??

----- Original Message -----
From: "Joerg Heinicke" <joerg(_dot_)heinicke(_at_)gmx(_dot_)de>

Seems to be a processor specific problem. The statement is correct. What
about test="string($demoValue[(_at_)value = 'valid'])" or
test="normalize-space($demoValue[(_at_)value = 'valid'])". Shorter and less
conversions in it.

Regards,

Joerg

Laura wrote:

sorry i meant
<xsl:if test="not(string-length($demoValue[(_at_)value = 'valid'])=0)">
This goes without errors in windows
but throws
java.lang.reflect.InvocationTargetException
when run on UNIX system


XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>