A major usability enhancement was validation debug outputs. Now the outputs correspond to how examples are shown in the specification. You will find in he output only what you are really interested in. Using the
-d
for validation the XFroms example from the specification shows the following output. You see exactly what JNVDL did, all the element and attribute sections it has created, interpretations it assigned to each section and finally fragments and what schema has been used to validate them. This may significatly help with debugging of your validation but also of JNVDL.
Example 1. Example JNVDL debug output
petr@alfa-pn-3:~/dev/project/nvdl/impl/dist$ ./jnvdl.sh -s ./example/primary/spec-xf-html.nvdl.xml -d ./example/primary/spec-xf-html.instance.xml Round tripping: false Keep line numbers: false Stage 1 - Decomposing Sections - <{http://www.w3.org/2002/06/xhtml2} ES1(table)> <{http://www.w3.org/2002/xforms} ES2(repeat)> AS{}(id nodeset ) <{http://www.w3.org/2002/06/xhtml2} ES3(tr)> <{http://www.w3.org/2002/xforms} ES4(input)> AS{}(ref ) <{http://www.w3.org/2002/06/xhtml2} ES5(p)> <{http://www.w3.org/2002/xforms} ES6(label)> </ES6(label)> </ES5(p)> </ES4(input)> </ES3(tr)> </ES2(repeat)> </ES1(table)> Stage 2 - Building Interpretations - Interpretation 1 AS{}(ref ) [ATTACH] ES1(table) [VALIDATE against '../secondary/xhtml2/xhtml2.rng'] ES4(input) [ATTACH] AS{}(id nodeset ) [ATTACH] ES2(repeat) [VALIDATE against '../secondary/xforms/xforms.rng'] ES5(p) [UNWRAP] ES6(label) [ATTACH] ES3(tr) [UNWRAP] Interpretation 2 AS{}(ref ) [ATTACH] ES1(table) [VALIDATE against '../secondary/xhtml2/xhtml2.rng'] ES4(input) [UNWRAP] AS{}(id nodeset ) [ATTACH] ES2(repeat) [UNWRAP] ES5(p) [ATTACH] ES6(label) [UNWRAP] ES3(tr) [ATTACH] Stage 3 and 4 - Combining Sections and Filtering - Validation candidate overwritten by a larger fragment: [1 < 4]<table xmlns="http://www.w3.org/2002/06/xhtml2" xmlns:xforms="http://www.w3.org/2002/xforms"> <tr> <td> <p> </p> </td> </tr> </table> Stage 5 - Validation - Schema 'file:/home/petr/dev/project/nvdl/impl/dist/./example/primary/../secondary/xhtml2/xhtml2.rng' Namespace 'http://relaxng.org/ns/structure/1.0' Fragment: '<table xmlns="http://www.w3.org/2002/06/xhtml2" xmlns:xforms="http://www.w3.org/2002/xforms"> <tr> <td> <p> </p> </td> </tr> </table>' ERROR: line 1 column 94, tag name "table" is not allowed. Possible tag names are: <html> Schema 'file:/home/petr/dev/project/nvdl/impl/dist/./example/primary/../secondary/xforms/xforms.rng' Namespace 'http://relaxng.org/ns/structure/1.0' Fragment: '<xforms:repeat xmlns:xforms="http://www.w3.org/2002/xforms" id="lineset" nodeset="/my:lines/my:line"> <xforms:input ref="my:price"> <xforms:label>Line Item</xforms:label> </xforms:input> </xforms:repeat>'
Thank you for putting this together. This information will help me to be more effective. I enjoyed reading the article above, really explains everything in detail. Thank you and good luck for the next articles
ReplyDeleteDedicatedHosting4u.com