Hi
I've run into a strange behavior using a custom processor. It seems it is correctly mapped (the right method is called). The use is: <!-- Get the query from the XXX classes. --> <p:processor name="xxx:xxx-participant"> <p:input name="instance" href="#instance"/> <p:output name="query" id="query"/> </p:processor> The output in #query looks like: <xdb:query xmlns:xdb="http://orbeon.org/oxf/xml/xmldb" collection="/db/xxx"> ... the xquery itself ... </xdb:query> I get the following exception when outputing the result of the processor to the content handler it receives from Orbeon: org.orbeon.oxf.common.ValidationException: null, line 2, column 39: Error tag name "xdb:query" is not allowed. Possible tag names are: <delete>,<insert>,<query>,<update>(schema: http://www.orbeon.org/oxf/xmldb-query) null, line 2, column 39: Error tag name "xdb:query" is not allowed. Possible tag names are: <delete>,<insert>,<query>,<update>(schema: http://www.orbeon.org/oxf/xmldb-query) at org.orbeon.oxf.processor.validation.MSVValidationProcessor$8.error(MSVValidationProcessor.java:197) at com.sun.msv.verifier.Verifier.onError(Verifier.java:336) at com.sun.msv.verifier.Verifier.onError(Verifier.java:328) at com.sun.msv.verifier.Verifier.startElement(Verifier.java:193) at org.orbeon.oxf.xml.TeeContentHandler.startElement(TeeContentHandler.java:80) at XXX (my custom processor) ... The TeeContentHandler is the content handler passed by Orbeon to my custom processor's method generateQuery(). The question is: I don't know why a validation is performed on the output of the processor (not where to look to disable it, nor why the validation fails), and how to solve this problem? (either by using something else than xdb:query or than oxf:xmldb-query) Here is again the custom processor call, in context: <!-- Get the query from the XXX classes. --> <p:processor name="xxx:xxx-participant"> <p:input name="instance" href="#instance"/> <p:output name="query" id="query"/> </p:processor> <!-- Evaluate the XQuery Update query. --> <p:processor name="oxf:pipeline"> <p:input name="config" href="oxf:do-xdb-query.xpl"/> <p:input name="query" href="#query"/> <p:output name="data" id="unused"/> </p:processor> do-xdb-query.xpl being: <p:processor name="oxf:xmldb-query"> <p:input name="datasource" href="oxf:datasource.xml"/> <p:input name="query" href="#query"/> <p:output name="data" ref="data"/> </p:processor> Thank you for any clue, regards, --drkm _____________________________________________________________________________ Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
The validation is not really done on the output of your processor, but
on the input of the oxf:xmldb-query processor. This is validated with the Schema URI: http://www.orbeon.org/oxf/xmldb-query which in turn refers to the following schema internally: xmldb-processor-query.rng The validation takes place to make sure that oxf:xmldb-query gets the proper configuration. So it seems that somehow, your processor does not output something compatible with that schema. How do you produce the output in your custom processor? Using SAX directly, or serializing a DOM? -Erik On Aug 26, 2008, at 8:27 AM, Florent Georges wrote: > Hi > > I've run into a strange behavior using a custom processor. > It seems it is correctly mapped (the right method is called). > The use is: > > <!-- Get the query from the XXX classes. --> > <p:processor name="xxx:xxx-participant"> > <p:input name="instance" href="#instance"/> > <p:output name="query" id="query"/> > </p:processor> > > The output in #query looks like: > > <xdb:query xmlns:xdb="http://orbeon.org/oxf/xml/xmldb" > collection="/db/xxx"> > ... the xquery itself ... > </xdb:query> > > > I get the following exception when outputing the result of > the processor to the content handler it receives from Orbeon: > > org.orbeon.oxf.common.ValidationException: null, line 2, column > 39: Error tag name "xdb:query" is not allowed. Possible tag > names are: <delete>,<insert>,<query>,<update>(schema: > http://www.orbeon.org/oxf/xmldb-query) > null, line 2, column 39: Error tag name "xdb:query" is not > allowed. Possible tag names are: > <delete>,<insert>,<query>,<update>(schema: > http://www.orbeon.org/oxf/xmldb-query) > at > org.orbeon.oxf.processor.validation.MSVValidationProcessor > $8.error(MSVValidationProcessor.java:197) > at com.sun.msv.verifier.Verifier.onError(Verifier.java:336) > at com.sun.msv.verifier.Verifier.onError(Verifier.java:328) > at com.sun.msv.verifier.Verifier.startElement(Verifier.java:193) > at > org > .orbeon > .oxf.xml.TeeContentHandler.startElement(TeeContentHandler.java:80) > at XXX (my custom processor) > ... > > The TeeContentHandler is the content handler passed by Orbeon > to my custom processor's method generateQuery(). > > The question is: I don't know why a validation is performed > on the output of the processor (not where to look to disable > it, nor why the validation fails), and how to solve this > problem? (either by using something else than xdb:query or than > oxf:xmldb-query) > > Here is again the custom processor call, in context: > > <!-- Get the query from the XXX classes. --> > <p:processor name="xxx:xxx-participant"> > <p:input name="instance" href="#instance"/> > <p:output name="query" id="query"/> > </p:processor> > > <!-- Evaluate the XQuery Update query. --> > <p:processor name="oxf:pipeline"> > <p:input name="config" href="oxf:do-xdb-query.xpl"/> > <p:input name="query" href="#query"/> > <p:output name="data" id="unused"/> > </p:processor> > > do-xdb-query.xpl being: > > <p:processor name="oxf:xmldb-query"> > <p:input name="datasource" href="oxf:datasource.xml"/> > <p:input name="query" href="#query"/> > <p:output name="data" ref="data"/> > </p:processor> > > Thank you for any clue, regards, > > --drkm > > > > > > > > > > > > > > > > > > > > > > > > > _____________________________________________________________________________ > Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Erik Bruchez wrote:
Erik, > The validation is not really done on the output of your processor, > but on the input of the oxf:xmldb-query processor. This is validated > with the Schema URI: > http://www.orbeon.org/oxf/xmldb-query > which in turn refers to the following schema internally: > xmldb-processor-query.rng Thank you for the input. That confirmed that what I produced was valid. That eliminated my first, only clue. But, wait a minute, if my document is valid, why does the validator complain, ..., I use a SAX parser, and... Gosh, no, not that beginner's error! Yes, I hadn't set the namespace support on the SAX parser factory. I've never understood why this is not the default those days :-( Thank you for your answer, that helped me to locate that shameful bug. --drkm _____________________________________________________________________________ Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |