Open redaktor opened 9 years ago
At the end it should not:
<xs:complexType>
<xs:attribute name="countryCode" type="xs:string" />
</xs:complexType>
becomes
{
"properties": {
"countryCode": {
"type": "string"
}
},
"type": "object"
}
as you would expect. There's a test specified for this scenario too.
FYI: While processing the XSD all attributes are prefixed with an @
for being able to handle the following situation:
<xs:complexType>
<xs:all>
<xs:element name="countryCode" type="xs:string" />
</xs:all>
<xs:attribute name="countryCode" type="xs:string" />
</xs:complexType>
Though the Prolog predicate remove_at_from_property_names/2
will remove any unnecessary @
-prefix.
I tested with the Schemas in PRISM - it is a namespace absolutely not following 5-star-data or linked data. But it is used in popular OWL ontologies. They have got XML Schemas which you can download in a .zip here ;) : http://www.idealliance.org/specifications/prism-metadata-initiative/prism
I already read your other issue and posts on the json-schema mailing list. I will have a look at the PRISM schemas this weekend :)
E.g.
becomes