Three ways of writing XML transformation programs
by Rick Jelliffe
First, I used Topologi's high-level inhouse Java library for XSD, which we use on other products. I looked at converting that into the Java API of one of the versions of RELAX NG in James Clarks' Trang translation software.
Second, I tried using XSLT to generate RELAX NG Compact Syntax directly.
Third, I looked at using XSLT 2 (Saxon) to generate RELAX NG as XML, then use Trang to convert from this XML to RELAX NG Compact Syntax.
Which one did I go with?
|Question: why not convert the xs:documentation elements to RNG-namespaced documentation? Rather trivial detail admittedly.|
Most comments are translated to >> comments.
A few are removed in situations where RELAX NG compact does not allow them (the details escape me, it is something like comments on enumerated values).
And there is one or two situations where the comments are duplicated, both as [xs:documentation] and >> comments. Comments were not high on my priorities for making the Ecma draft deadline; however they certainly are high on the list of things to have right by the time the ISO standard comes out.
For the first stage in approach #3, couldn't XSLT 1.0, possibly using EXSLT, have done just as well? Or was 2.0 more of an incidental choice?