xpath exception with existing form and svn trunk

View: New views
1 Messages — Rating Filter:   Alert me  

xpath exception with existing form and svn trunk

by Ronald van Kuijk :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Trying an exisiting form with svn trunk of 15-08-08/15:30 I get the forllowing exception

[STDOUT] ERROR org.chiba.xml.xforms.Container : dispatch: exception during event flow
org.chiba.xml.xforms.exception.XFormsException: XPath syntax error at char 18 in {../child::element({http:}:
    Unexpected { after '(' in SequenceType
        at org.chiba.xml.xpath.impl.saxon.XPathCache.evaluate(XPathCache.java:131)
        at org.chiba.xml.xpath.impl.saxon.XPathCache.evaluate(XPathCache.java:75)
        at org.chiba.xml.xforms.constraints.DependencyGraph.getXPathRefNodes(DependencyGraph.java:173)
        at org.chiba.xml.xforms.constraints.MainDependencyGraph.addReferredNodesToGraph(MainDependencyGraph.java:173)
        at org.chiba.xml.xforms.constraints.MainDependencyGraph.buildBindGraph(MainDependencyGraph.java:235)
        at org.chiba.xml.xforms.core.Model.rebuild(Model.java:609)
        at org.chiba.xml.xforms.core.Model.modelConstruct(Model.java:874)
        at org.chiba.xml.xforms.core.Model.performDefault(Model.java:762)
        at org.chiba.xml.events.impl.DefaultXMLEventService.dispatch(DefaultXMLEventService.java:286)
        at org.chiba.xml.xforms.Container.dispatch(Container.java:494)
        at org.chiba.xml.xforms.Container.dispatch(Container.java:472)
        at org.chiba.xml.xforms.Container.initModels(Container.java:707)
        at org.chiba.xml.xforms.Container.init(Container.java:320)
        at org.chiba.xml.xforms.ChibaBean.init(ChibaBean.java:472)
        at org.chiba.agent.web.WebProcessor.init(Unknown Source)
        at org.chiba.agent.web.flux.FluxProcessor.init(Unknown Source)
        at org.chiba.agent.web.session.impl.XFormsSessionBase.init(Unknown Source)
        at org.chiba.agent.web.filter.XFormsFilter.doFilter(Unknown Source)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
        at java.lang.Thread.run(Thread.java:636)
Caused by: net.sf.saxon.trans.XPathException: XPath syntax error at char 18 in {../child::element({http:}:
    Unexpected { after '(' in SequenceType
        at net.sf.saxon.expr.ExpressionParser.grumble(ExpressionParser.java:159)
        at net.sf.saxon.expr.ExpressionParser.grumble(ExpressionParser.java:135)
        at net.sf.saxon.expr.ExpressionParser.parseKindTest(ExpressionParser.java:1601)
        at net.sf.saxon.expr.ExpressionParser.parseNodeTest(ExpressionParser.java:1471)
        at net.sf.saxon.expr.ExpressionParser.parseBasicStep(ExpressionParser.java:1390)
        at net.sf.saxon.expr.ExpressionParser.parseStepExpression(ExpressionParser.java:1223)
        at net.sf.saxon.expr.ExpressionParser.parseRelativePath(ExpressionParser.java:1168)
        at net.sf.saxon.expr.ExpressionParser.parsePathExpression(ExpressionParser.java:1149)
        at net.sf.saxon.expr.ExpressionParser.parseUnaryExpression(ExpressionParser.java:1038)
        at net.sf.saxon.expr.ExpressionParser.parseCastExpression(ExpressionParser.java:701)
        at net.sf.saxon.expr.ExpressionParser.parseCastableExpression(ExpressionParser.java:656)
        at net.sf.saxon.expr.ExpressionParser.parseTreatExpression(ExpressionParser.java:637)
        at net.sf.saxon.expr.ExpressionParser.parseInstanceOfExpression(ExpressionParser.java:619)
        at net.sf.saxon.expr.ExpressionParser.parseIntersectExpression(ExpressionParser.java:1071)
        at net.sf.saxon.expr.ExpressionParser.parseUnionExpression(ExpressionParser.java:1053)
        at net.sf.saxon.expr.ExpressionParser.parseMultiplicativeExpression(ExpressionParser.java:990)
        at net.sf.saxon.expr.ExpressionParser.parseAdditiveExpression(ExpressionParser.java:970)
        at net.sf.saxon.expr.ExpressionParser.parseRangeExpression(ExpressionParser.java:886)
        at net.sf.saxon.expr.ExpressionParser.parseComparisonExpression(ExpressionParser.java:836)
        at net.sf.saxon.expr.ExpressionParser.parseAndExpression(ExpressionParser.java:433)
        at net.sf.saxon.expr.ExpressionParser.parseOrExpression(ExpressionParser.java:415)
        at net.sf.saxon.expr.ExpressionParser.parseExprSingle(ExpressionParser.java:364)
        at net.sf.saxon.expr.ExpressionParser.parseExpression(ExpressionParser.java:316)
        at net.sf.saxon.expr.ExpressionParser.parse(ExpressionParser.java:238)
        at net.sf.saxon.expr.ExpressionTool.make(ExpressionTool.java:72)
        at org.chiba.xml.xpath.impl.saxon.sxpath.XPathEvaluator.createExpression(XPathEvaluator.java:167)
        at org.chiba.xml.xpath.impl.saxon.XPathCache.getXPathExpression(XPathCache.java:161)
        at org.chiba.xml.xpath.impl.saxon.XPathCache.evaluate(XPathCache.java:105)
        ... 35 more



The element where it goes wrong is the bind_84 relevant attribute below.

                                <xforms:bind id="bind_83" nodeset="structures:GARINB" required="false()" type="string" />
                                <xforms:bind id="bind_84" nodeset="structures:GARINBT" required="false()"
                                    type="cdt:TypeAlfanumeriekVariabel35" relevant="../structures:GARINB = 'Z'" />

I found this with a little extra debug I found out the xpathString being used at that moment is

../child::element({http://www.ec-design.nl/Abz/OBI/1/structures}GARINB, xs:anyType)

So it expanded the prefix oae to the namespace and then cannot parse it. Does this mean I have my namespace declarations wrong?

It worked in the previous version, but that might have been to lax. The (imo) relevant parts are:

The 'head' of the form:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:cdt="http://www.ec-design.nl/Abz/OBI/1/domains"
    xmlns:chiba="http://chiba.sourceforge.net/xforms" xmlns:ev="http://www.w3.org/2001/xml-events"
    xmlns:schema="http://www.ec-design.nl/Abz/OBI/1/structures" xmlns:oae="http://www.ec-design.nl/Abz/OBI/1/structures"
    xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <head>
        <xforms:model id="model_0" schema="OpdrachtAanExpertInitieel.xsd">
            <xforms:instance id="instance_0">
                <TRANSACTIE xmlns="http://www.ec-design.nl/Abz/OBI/1/structures"
                    xsi:schemaLocation="http://www.ec-design.nl/Abz/OBI/1/structures OpdrachtAanExpertInitieel.xsd ">

The head of the related xsd (OpdrachtAanExpertInitieel.xsd):


<xsd:schema targetNamespace="http://www.ec-design.nl/Abz/OBI/1/structures" xmlns:cdt="http://www.ec-design.nl/Abz/OBI/1/domains" xmlns:str="http://www.ec-design.nl/Abz/OBI/1/structures" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xsd:import namespace="http://www.ec-design.nl/Abz/OBI/1/domains" schemaLocation="DomainsAbzObi1.xsd"/>

and the delacration of GARINB and GARINBT within their parent

                                                                <xsd:element name="GARINB" minOccurs="0">
                                                                    <xsd:simpleType>
                                                                        <xsd:restriction base="cdt:TypeGarantieTegenOnderverzekering">
                                                                            <xsd:enumeration value="G"/>
                                                                            <xsd:enumeration value="J"/>
                                                                            <xsd:enumeration value="Z"/>
                                                                        </xsd:restriction>
                                                                    </xsd:simpleType>
                                                                </xsd:element>
                                                                <xsd:element name="GARINBT" type="cdt:TypeAlfanumeriekVariabel35" minOccurs="0"/>

I'll try debugging further but if anyone  has a clue I'd be greatful

Ronald

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Chiba-users mailing list
Chiba-users@...
https://lists.sourceforge.net/lists/listinfo/chiba-users
LightInTheBox - Buy quality products at wholesale price!