Hi, I believe I have found a bug in the XPL processor in case of using the transform=“oxf:xslt“ inside p:for-each block. It yields an error even if it is encapsulated in another XPL called with p:pipeline inside p:for-each block (which is the
biggest problem from my point of view). Tested on 3.9 release. Test case: <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xdb="http://orbeon.org/oxf/xml/xmldb" xmlns:xu="http://www.xmldb.org/xupdate"
xmlns:xforms="http://www.w3.org/2002/xforms" > <p:param type="input" name="instance" /> <p:param type="output" name="data" /> <p:processor name="oxf:identity"> <p:input name="data"> <input> <envelope><id>1</id></envelope> <envelope><id>2</id></envelope> </input> </p:input> <p:output name="data" id="input" /> </p:processor> <p:for-each href="#input" select="/input/envelope" root="result" id="result"> <!-- this does not work - I even do not have to use the current() href --> <p:processor name="oxf:identity"> <p:input name="data" href="#instance" transform="oxf:xslt" > <test xsl:version="2.0" ><xsl:value-of select="/whatever" /></test> </p:input> <p:output name="data" ref="result" /> </p:processor> <!-- however this works perfectly --> <!--p:processor name="oxf:xslt"> <p:input name="data" href="#instance" /> <p:input name="config"> <test xsl:version="2.0" ><xsl:value-of select="/whatever" /></test> </p:input> <p:output name="data" ref="result" /> </p:processor--> </p:for-each> <p:processor name="oxf:identity"> <p:input name="data" href="#result" /> <p:output name="data" ref="data" /> </p:processor> </p:config> Resulting error is: 2011-11-14 00:48:08,561 ERROR ProcessorService - Exception at line 22, column 41 of oxf:/apps/forms/dao/multiedit.xpl (reading processor output: name='data', ref='result') org.orbeon.oxf.common.OXFException: Attempt to read non-existing output: data at org.orbeon.oxf.processor.transformer.xslt.XSLTTransformer$1.readImpl(XSLTTransformer.java:189) at org.orbeon.oxf.processor.impl.ProcessorOutputImpl$TopLevelOutputFilter.read(ProcessorOutputImpl.java:263) at org.orbeon.oxf.processor.impl.ProcessorOutputImpl.read(ProcessorOutputImpl.java:406) at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:260) at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:264) at org.orbeon.oxf.processor.IdentityProcessor$1.readImpl(IdentityProcessor.java:34) at org.orbeon.oxf.processor.impl.ProcessorOutputImpl$TopLevelOutputFilter.read(ProcessorOutputImpl.java:263) at org.orbeon.oxf.processor.impl.ProcessorOutputImpl.read(ProcessorOutputImpl.java:406) at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:260) at org.orbeon.oxf.processor.pipeline.PipelineProcessor$1$1.run(PipelineProcessor.java:94) at org.orbeon.oxf.processor.pipeline.PipelineProcessor.executeChildren(PipelineProcessor.java:726) at org.orbeon.oxf.processor.pipeline.PipelineProcessor.access$000(PipelineProcessor.java:61) at org.orbeon.oxf.processor.pipeline.PipelineProcessor$1.readImpl(PipelineProcessor.java:92) at org.orbeon.oxf.processor.impl.ProcessorOutputImpl$TopLevelOutputFilter.read(ProcessorOutputImpl.java:263) at org.orbeon.oxf.processor.impl.ProcessorOutputImpl.read(ProcessorOutputImpl.java:406) at org.orbeon.oxf.processor.pipeline.foreach.ConcreteForEachProcessor$1.readImpl(ConcreteForEachProcessor.java:143) at org.orbeon.oxf.processor.impl.ProcessorOutputImpl$TopLevelOutputFilter.read(ProcessorOutputImpl.java:263) at org.orbeon.oxf.processor.impl.ProcessorOutputImpl.read(ProcessorOutputImpl.java:406) at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:260) at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:264) at org.orbeon.oxf.processor.IdentityProcessor$1.readImpl(IdentityProcessor.java:34) at org.orbeon.oxf.processor.impl.ProcessorOutputImpl$TopLevelOutputFilter.read(ProcessorOutputImpl.java:263) at org.orbeon.oxf.processor.impl.ProcessorOutputImpl.read(ProcessorOutputImpl.java:406) at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:260) at org.orbeon.oxf.processor.pipeline.PipelineProcessor$1$1.run(PipelineProcessor.java:94) at org.orbeon.oxf.processor.pipeline.PipelineProcessor.executeChildren(PipelineProcessor.java:726) at org.orbeon.oxf.processor.pipeline.PipelineProcessor.access$000(PipelineProcessor.java:61) at org.orbeon.oxf.processor.pipeline.PipelineProcessor$1.readImpl(PipelineProcessor.java:92) … Zdenek -- 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
|
Hi Zdenek, Nice catch! It's been ages since we had a bug report with the XPL engine. This is now fixed, and will be in the next nightly build. When you get a chance to try this out, you'll let us know if this works for you. For reference, I've included below the link to the bug and commit.
Alex
2011/11/13 Hřib Zdeněk <[hidden email]>
Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Hi Alex, I merged the new PipelineProcessor.java to the original 3.9 release source and tested on a real world app and the for-each cycle now works with inline transformation!
(I just hope it does not break anything else J ) Thanks a lot, now I do not have to replace all the inline transformations with xslt processors. BTW: When using the inline transformation, it would be great to debug the outcome of the transformation as well as the input (the debug=“…“ attribute debugs
only the transformation input. It could be sometimes a reason to convert the inline transformation to xslt processor anyway. I could try to implement that someday … Zdenek From: Alessandro Vernet [mailto:[hidden email]]
Hi Zdenek, Nice catch! It's been ages since we had a bug report with the XPL engine. This is now fixed, and will be in the next nightly build. When you get a chance to try this out, you'll let us know if this works for you. For reference, I've included
below the link to the bug and commit. Alex 2011/11/13 Hřib Zdeněk <[hidden email]> Hi, I believe I have found a bug in the XPL processor in case of using the transform=“oxf:xslt“ inside p:for-each block. It yields an error even if it is encapsulated in another XPL
called with p:pipeline inside p:for-each block (which is the biggest problem from my point of view).
Tested on 3.9 release. Test case: <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:oxf="http://www.orbeon.com/oxf/processors"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xdb="http://orbeon.org/oxf/xml/xmldb" xmlns:xu="http://www.xmldb.org/xupdate"
xmlns:xforms="http://www.w3.org/2002/xforms" > <p:param type="input" name="instance" /> <p:param type="output" name="data" /> <p:processor name="oxf:identity"> <p:input name="data"> <input> <envelope><id>1</id></envelope> <envelope><id>2</id></envelope> </input> </p:input> <p:output name="data" id="input" /> </p:processor>
<p:for-each href="#input" select="/input/envelope" root="result" id="result"> <!-- this does not work - I even do not have to use the current() href --> <p:processor name="oxf:identity"> <p:input name="data" href="#instance" transform="oxf:xslt" > <test xsl:version="2.0" ><xsl:value-of select="/whatever" /></test> </p:input> <p:output name="data" ref="result" /> </p:processor>
<!-- however this works perfectly --> <!--p:processor name="oxf:xslt"> <p:input name="data" href="#instance" />
<p:input name="config"> <test xsl:version="2.0" ><xsl:value-of select="/whatever" /></test> </p:input> <p:output name="data" ref="result" /> </p:processor-->
</p:for-each> <p:processor name="oxf:identity"> <p:input name="data" href="#result" /> <p:output name="data" ref="data" /> </p:processor>
</p:config> Resulting error is: 2011-11-14 00:48:08,561 ERROR ProcessorService - Exception at line 22, column 41 of oxf:/apps/forms/dao/multiedit.xpl (reading processor output: name='data', ref='result') org.orbeon.oxf.common.OXFException: Attempt to read non-existing output: data at org.orbeon.oxf.processor.transformer.xslt.XSLTTransformer$1.readImpl(XSLTTransformer.java:189) at org.orbeon.oxf.processor.impl.ProcessorOutputImpl$TopLevelOutputFilter.read(ProcessorOutputImpl.java:263) at org.orbeon.oxf.processor.impl.ProcessorOutputImpl.read(ProcessorOutputImpl.java:406) at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:260) at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:264) at org.orbeon.oxf.processor.IdentityProcessor$1.readImpl(IdentityProcessor.java:34) at org.orbeon.oxf.processor.impl.ProcessorOutputImpl$TopLevelOutputFilter.read(ProcessorOutputImpl.java:263) at org.orbeon.oxf.processor.impl.ProcessorOutputImpl.read(ProcessorOutputImpl.java:406) at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:260) at org.orbeon.oxf.processor.pipeline.PipelineProcessor$1$1.run(PipelineProcessor.java:94) at org.orbeon.oxf.processor.pipeline.PipelineProcessor.executeChildren(PipelineProcessor.java:726) at org.orbeon.oxf.processor.pipeline.PipelineProcessor.access$000(PipelineProcessor.java:61) at org.orbeon.oxf.processor.pipeline.PipelineProcessor$1.readImpl(PipelineProcessor.java:92) at org.orbeon.oxf.processor.impl.ProcessorOutputImpl$TopLevelOutputFilter.read(ProcessorOutputImpl.java:263) at org.orbeon.oxf.processor.impl.ProcessorOutputImpl.read(ProcessorOutputImpl.java:406) at org.orbeon.oxf.processor.pipeline.foreach.ConcreteForEachProcessor$1.readImpl(ConcreteForEachProcessor.java:143) at org.orbeon.oxf.processor.impl.ProcessorOutputImpl$TopLevelOutputFilter.read(ProcessorOutputImpl.java:263) at org.orbeon.oxf.processor.impl.ProcessorOutputImpl.read(ProcessorOutputImpl.java:406) at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:260) at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:264) at org.orbeon.oxf.processor.IdentityProcessor$1.readImpl(IdentityProcessor.java:34) at org.orbeon.oxf.processor.impl.ProcessorOutputImpl$TopLevelOutputFilter.read(ProcessorOutputImpl.java:263) at org.orbeon.oxf.processor.impl.ProcessorOutputImpl.read(ProcessorOutputImpl.java:406) at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:260) at org.orbeon.oxf.processor.pipeline.PipelineProcessor$1$1.run(PipelineProcessor.java:94) at org.orbeon.oxf.processor.pipeline.PipelineProcessor.executeChildren(PipelineProcessor.java:726) at org.orbeon.oxf.processor.pipeline.PipelineProcessor.access$000(PipelineProcessor.java:61) at org.orbeon.oxf.processor.pipeline.PipelineProcessor$1.readImpl(PipelineProcessor.java:92) … Zdenek
-- -- 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
|
"I could try to implement that someday …"
That sounds good! -Erik On Sun, Nov 27, 2011 at 3:59 PM, Hřib Zdeněk <[hidden email]> wrote: > Hi Alex, > > > > I merged the new PipelineProcessor.java to the original 3.9 release source > and tested on a real world app and the for-each cycle now works with inline > transformation! (I just hope it does not break anything else J ) > > > > Thanks a lot, now I do not have to replace all the inline transformations > with xslt processors. > > > > BTW: When using the inline transformation, it would be great to debug the > outcome of the transformation as well as the input (the debug=“…“ attribute > debugs only the transformation input. It could be sometimes a reason to > convert the inline transformation to xslt processor anyway. I could try to > implement that someday … > > > > Zdenek > > > > From: Alessandro Vernet [mailto:[hidden email]] > Sent: Friday, November 18, 2011 9:31 PM > To: [hidden email] > Subject: [ops-users] Re: Bug in the XPL processor ? > > > > Hi Zdenek, > > > > Nice catch! It's been ages since we had a bug report with the XPL engine. > This is now fixed, and will be in the next nightly build. When you get a > chance to try this out, you'll let us know if this works for you. For > reference, I've included below the link to the bug and commit. > > > > http://forge.ow2.org/tracker/index.php?func=detail&aid=316279&group_id=168&atid=350207 > > https://github.com/orbeon/orbeon-forms/commit/b55e9f3260e451236deef6c440bfc339e1632774 > > > > Alex > > > > 2011/11/13 Hřib Zdeněk <[hidden email]> > > Hi, > > > > I believe I have found a bug in the XPL processor in case of using the > transform=“oxf:xslt“ inside p:for-each block. It yields an error even if it > is encapsulated in another XPL called with p:pipeline inside p:for-each > block (which is the biggest problem from my point of view). > > > > Tested on 3.9 release. > > > > Test case: > > <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" > xmlns:oxf="http://www.orbeon.com/oxf/processors" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:xdb="http://orbeon.org/oxf/xml/xmldb" > xmlns:xu="http://www.xmldb.org/xupdate" > xmlns:xforms="http://www.w3.org/2002/xforms" > > > <p:param type="input" name="instance" /> > > <p:param type="output" name="data" /> > > > > <p:processor name="oxf:identity"> > > <p:input name="data"> > > <input> > > <envelope><id>1</id></envelope> > > <envelope><id>2</id></envelope> > > </input> > > </p:input> > > <p:output name="data" id="input" /> > > </p:processor> > > > > <p:for-each href="#input" select="/input/envelope" root="result" > id="result"> > > > > <!-- this does not work - I even do not have to use the current() href > --> > > <p:processor name="oxf:identity"> > > <p:input name="data" href="#instance" transform="oxf:xslt" > > > <test xsl:version="2.0" ><xsl:value-of select="/whatever" /></test> > > </p:input> > > <p:output name="data" ref="result" /> > > </p:processor> > > > > <!-- however this works perfectly --> > > <!--p:processor name="oxf:xslt"> > > <p:input name="data" href="#instance" /> > > <p:input name="config"> > > <test xsl:version="2.0" ><xsl:value-of select="/whatever" /></test> > > </p:input> > > <p:output name="data" ref="result" /> > > </p:processor--> > > > > </p:for-each> > > > > <p:processor name="oxf:identity"> > > <p:input name="data" href="#result" /> > > <p:output name="data" ref="data" /> > > </p:processor> > > > > </p:config> > > > > Resulting error is: > > > > 2011-11-14 00:48:08,561 ERROR ProcessorService - Exception at line 22, > column 41 of oxf:/apps/forms/dao/multiedit.xpl (reading processor output: > name='data', ref='result') > > org.orbeon.oxf.common.OXFException: Attempt to read non-existing output: > data > > at > org.orbeon.oxf.processor.transformer.xslt.XSLTTransformer$1.readImpl(XSLTTransformer.java:189) > > at > org.orbeon.oxf.processor.impl.ProcessorOutputImpl$TopLevelOutputFilter.read(ProcessorOutputImpl.java:263) > > at > org.orbeon.oxf.processor.impl.ProcessorOutputImpl.read(ProcessorOutputImpl.java:406) > > at > org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:260) > > at > org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:264) > > at > org.orbeon.oxf.processor.IdentityProcessor$1.readImpl(IdentityProcessor.java:34) > > at > org.orbeon.oxf.processor.impl.ProcessorOutputImpl$TopLevelOutputFilter.read(ProcessorOutputImpl.java:263) > > at > org.orbeon.oxf.processor.impl.ProcessorOutputImpl.read(ProcessorOutputImpl.java:406) > > at > org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:260) > > at > org.orbeon.oxf.processor.pipeline.PipelineProcessor$1$1.run(PipelineProcessor.java:94) > > at > org.orbeon.oxf.processor.pipeline.PipelineProcessor.executeChildren(PipelineProcessor.java:726) > > at > org.orbeon.oxf.processor.pipeline.PipelineProcessor.access$000(PipelineProcessor.java:61) > > at > org.orbeon.oxf.processor.pipeline.PipelineProcessor$1.readImpl(PipelineProcessor.java:92) > > at > org.orbeon.oxf.processor.impl.ProcessorOutputImpl$TopLevelOutputFilter.read(ProcessorOutputImpl.java:263) > > at > org.orbeon.oxf.processor.impl.ProcessorOutputImpl.read(ProcessorOutputImpl.java:406) > > at > org.orbeon.oxf.processor.pipeline.foreach.ConcreteForEachProcessor$1.readImpl(ConcreteForEachProcessor.java:143) > > at > org.orbeon.oxf.processor.impl.ProcessorOutputImpl$TopLevelOutputFilter.read(ProcessorOutputImpl.java:263) > > at > org.orbeon.oxf.processor.impl.ProcessorOutputImpl.read(ProcessorOutputImpl.java:406) > > at > org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:260) > > at > org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:264) > > at > org.orbeon.oxf.processor.IdentityProcessor$1.readImpl(IdentityProcessor.java:34) > > at > org.orbeon.oxf.processor.impl.ProcessorOutputImpl$TopLevelOutputFilter.read(ProcessorOutputImpl.java:263) > > at > org.orbeon.oxf.processor.impl.ProcessorOutputImpl.read(ProcessorOutputImpl.java:406) > > at > org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:260) > > at > org.orbeon.oxf.processor.pipeline.PipelineProcessor$1$1.run(PipelineProcessor.java:94) > > at > org.orbeon.oxf.processor.pipeline.PipelineProcessor.executeChildren(PipelineProcessor.java:726) > > at > org.orbeon.oxf.processor.pipeline.PipelineProcessor.access$000(PipelineProcessor.java:61) > > at > org.orbeon.oxf.processor.pipeline.PipelineProcessor$1.readImpl(PipelineProcessor.java:92) > > … > > > > Zdenek > > > > > > -- > 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, open-source, for the Enterprise - > http://www.orbeon.com/ > My Twitter: http://twitter.com/avernet > > > > -- > 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 > -- 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 |