epiasini / XSDtoRNG

XSL stylesheet for XML Schema (XSD) to Relax NG (RNG) conversion.
Apache License 2.0
20 stars 9 forks source link

Reference to undefined pattern comment #20

Open greenrd opened 8 years ago

greenrd commented 8 years ago

I tried converting http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd to rnc using this stylesheet and then trang. However, when I tried to use the .rnc file in nxml-mode in emacs, it said: nxml-display-file-parse-error: Reference to undefined pattern comment.

My XSD is a bit rusty but it looks to me like comment is defined in the .xsd file, but is not defined in the .rng or .rnc files.

greenrd commented 8 years ago

I managed to workaround this by specifying the start parameter.

dwhoman commented 6 years ago

I was able to get this schema to work first by applying greenrd's sed script to the xsd file, renaming it with 'mod', then using xsltproc --stringparam start databaseChangeLog XSDtoRNG.xsl dbchangelog-3.1.mod.xsd > dbchangelog-3.1.rng. I then converted it to rnc with trang.