[oXygen-user] ADVICE: Validation, XInclude, thread order

Paul Everitt
Wed Feb 28 13:47:19 CST 2007


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



More information about the oXygen-user mailing list