[oXygen-user] ADVICE: Validation, XInclude, thread order
Paul Everitt
Fri Mar 2 07:18:41 CST 2007
I wrote a little Python server that produced a 15 sec delay for one
URL and immediately returned another. I then placed the delayed URL
first in the document order.
Good news: you're right. The second URL wasn't accessed until
15.00001 sec had passed.
Bad news: my actual usage still seems to exhibit the same behavior.
Conclusion: I need to learn more about what is happening. [wink]
Thanks for the reply, though.
--Paul
On Mar 1, 2007, at 3:13 AM, George Cristian Bina wrote:
> Hi Paul,
>
> If you resolve the XInclude from oXygen by enabling XInclude
> processing then you should get the included documents accessed in
> order. If you want to actually get a document with all XInclude
> elements resolved then all you need is to have a identity copy
> transformation that eventually only adds the processing
> instructions for schema association.
> Note also that the Relax NG and Schematron validation is applied on
> the document with XInclude resolved (replaced with the actual
> content) if the XInclude support is enabled from the oXygen
> options. If the XInclude is disabled then the document as it is,
> without the XInclude elements expanded will be validated against
> the Relax NG schema or Schematron rules.
>
> Best Regards,
> George
> ---------------------------------------------------------------------
> George Cristian Bina
> <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
> http://www.oxygenxml.com
>
>
> Paul Everitt wrote:
>> My apologies, this is going to sound pretty weird.
>> Background
>> -------------------
>> I'm on a project that is using oXygen quite heavily to manage the
>> "front end" of a web system. The site is organized by packages of
>> screens. Each screen has local XML data modeling what the back-
>> end should provide. Once modeled, the back-end developers
>> implement something to match that model of the screen data. We
>> then validate (RNG+Schematron) that the connection is as expected.
>> During the course of this, I've started using lots of oXygen
>> facilities to make things more productive. In this case, I have a
>> master XML document with XIncludes to all the screens in the
>> system. A transformation scenario converts this into a new output
>> document with all the XIncludes merged, and with the PIs for the
>> the RNG/SCH.
>> People on the project can then do something like a unit test: open
>> this master document, click the red play button, then click the
>> red check button to validate all remote screens.
>> In fact, since we can cheat and do add/edit/delete via a URL, they
>> can validate form responses. And thus the problem...
>> Problem
>> -------------------
>> In my test scenario, order matters. I need to create a sample
>> folder, add some documents to it, validate those documents, then
>> delete them. All this is done by URL parameters on the XInclude
>> (yes, this is cheating on GET.) If the delete happens before the
>> add, though...well, it doesn't work.
>> Unfortunately, I think XInclude happens via threads. Thus, the
>> order entries appear in the XML document doesn't mean order of
>> operation, and I delete something before it is added.
>> I've thought about splitting the XML document up into a
>> test_setup.xml, test.xml, and test_teardown.xml sequence. But
>> unfortunately, I'd wind up with several setups and teardowns,
>> based on containment.
>> The only think I can think of is to have one document per "test",
>> and make people run them one at a time. Which would suck. Or,
>> have a multi-step transform scenario, and use XSLT document() to
>> assemble all the screens linearly, instead of XInclude.
>> Any ideas?
>> --Paul
>> _______________________________________________
>> oXygen-user mailing list
>>
>> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>
More information about the oXygen-user
mailing list