Project

Profile

Help

ExternalObjectType cast to BuiltInAtomicType

Added by Anonymous over 16 years ago

Legacy ID: #4574372 Legacy Poster: spackers (spackers)

Hi, I've just upgraded to 8.9.0.4 and I'm getting this ClassCastException: java.lang.ClassCastException: net.sf.saxon.type.ExternalObjectType cannot be cast to net.sf.saxon.type.BuiltInAtomicType at net.sf.saxon.expr.GeneralComparison.typeCheck(GeneralComparison.java:136) at net.sf.saxon.expr.GeneralComparison10.optimize(GeneralComparison10.java:134) at net.sf.saxon.instruct.Choose.optimize(Choose.java:106) at net.sf.saxon.instruct.Block.optimize(Block.java:275) at net.sf.saxon.instruct.ParentNodeConstructor.optimize(ParentNodeConstructor.java:147) at net.sf.saxon.instruct.Block.optimize(Block.java:275) at net.sf.saxon.instruct.ParentNodeConstructor.optimize(ParentNodeConstructor.java:147) at net.sf.saxon.instruct.Block.optimize(Block.java:275) at net.sf.saxon.instruct.ParentNodeConstructor.optimize(ParentNodeConstructor.java:147) at net.sf.saxon.style.XSLTemplate.compile(XSLTemplate.java:333) at net.sf.saxon.style.XSLStylesheet.compileStylesheet(XSLStylesheet.java:1050) at net.sf.saxon.PreparedStylesheet.setStylesheetDocument(PreparedStylesheet.java:328) at net.sf.saxon.PreparedStylesheet.prepare(PreparedStylesheet.java:140) at net.sf.saxon.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:137) at com.zenesis.core.xslt.StylesheetCache.loadStylesheet(StylesheetCache.java:303) [...snip...] This is caused by a piece of code called: <xsl:if test="$useCookies ne ''"> [...snip...] </xsl:if> Any ideas what's going on? The only thing I can find on Google is something on oxygen's site where they seem to say this is fixed in 8.9.0.3 but is also a "feature" ... ? If it's a feature, how do you do comparisons (of text etc) now? Cheers, John


Replies (3)

Please register to reply

RE: ExternalObjectType cast to BuiltInAtomicT - Added by Anonymous over 16 years ago

Legacy ID: #4574394 Legacy Poster: spackers (spackers)

Scratch that, sorry - I thought I'd upgraded to 8.9.0.4 because I clicked on the link on the website for the latest source but actually got 8.9.0.0. So, now I get a more descriptive error message saying that comparisons cannot be done on external objects...but obviously this can really useful sometimes! How does anyone else do it? Is there a library somewhere of methods like equalsInt(), equalsDouble() etc? Thanks, John

RE: ExternalObjectType cast to BuiltInAtomicT - Added by Anonymous over 16 years ago

Legacy ID: #4574407 Legacy Poster: Michael Kay (mhkay)

I think offhand that you can use the string() function on an external object to convert it to a string. If that doesn't work you can always call the external object's toString() method directly as an extension function.

RE: ExternalObjectType cast to BuiltInAtomicT - Added by Anonymous over 16 years ago

Legacy ID: #4575945 Legacy Poster: spackers (spackers)

Thanks Michael!

    (1-3/3)

    Please register to reply