tksk / jing-trang

Automatically exported from code.google.com/p/jing-trang
0 stars 0 forks source link

Conversion of RNG <a:documentation> to XSD <xs:documentation> #83

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Converting from RNG to XSD, all annotations are lost.

What is the expected output? 

Expecting the content of <a:documentation> to be copied to
<xs:documentation> if content is text()or copied to <xs:annotation> if
content is an element/elements.

What version of the product are you using? 
Oxygen version 10.3

Please provide any additional information below.
There are tools to generate documentation from XSD, we could be using them
if we were not losing the RNG annotations in the conversion process.

We added child elements from our schemadoc namespace to <a:documentation>
that go beyond RNG; still we would like these elements to be copied over to
<xs:annotation> or <xs:documentation> during the conversion process.

Original issue reported on code.google.com by diane_...@hotmail.com on 18 Aug 2009 at 3:10

GoogleCodeExporter commented 9 years ago
The following XSD:

<xs:annotation>
<xs:documentation><schemadoc:desc>...</schemadoc:desc></xs:documentation>
</xs:annotation>

will come out as valid and permit us to enhance the documentation process.

Original comment by diane_...@hotmail.com on 18 Aug 2009 at 8:11

GoogleCodeExporter commented 9 years ago
annotations are also lost when using jing -s to generate simplified rng. 
Including this namespace declaration:

xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"

and used thus ...

    <element name="production">
      <a:annotation>Root element of any TM.</a:annotation>

The annotation is not included in the simplified rng output.

Not to mix issues, but I wonder how much of this is related to namespaces?

 <optional>
   <ref name="element.crew" v:version="Chg3"/>
   <ref name="element.c" v:version="RevA"/>
 </optional>

in the simplifed output appears to be transformed to:

<optional>
   <group>
      <ref name="crew"/>
      <ref name="c"/>
   </group>
</optional>

Original comment by eileen.k...@gmail.com on 8 Oct 2010 at 4:01