Friday, February 24, 2006

Problem converting RNC/RNG annotations to XSD annotations with Trang

first, let me say "thank you!" to James Clark for all of your work on RelaxNG, Trang and Jing! I do all of my DocBook customization layers in RNC and convert to the appropriate supported schema language for my client's editors. It has made my life much easier!

I am trying to convert an RNC schema to XSD with annotations that look like:

##Foo: This element is the top level container for the entire
document. Attributes for this element
## provide information about the status of the document.
Foo =
 element Foo {blah
}

When I run Trang to convert the RNC (I've also tried RNC to RNG to XSD) to XSD, none of the annotations come across. When converting the RNC to RNG, the annotations come across, but are lost with the step to XSD.

 <define name="Foo">
   <a:documentation>Foo: This element is the top level
container for the entire document. Attributes for this element provide
information about the status of the document.</a:documentation>
   <element name="Foo">

I am confident I am using the appropriate markup, since the annotations carry over to RNG appropriately.

Does anyone have any fixes or suggestions for getting the appropriate XSD annotations? Such as:

  <xs:annotation>
     <xs:documentation>Foo: This element is the top level
container for the entire document. Attributes for this element provide
information about the status of the document.</xs:documentation>
   </xs:annotation>

Categories: , ,

No comments: