← Prev in month
← Prev in thread
[relax-ng] Conversion of comments between the compact and the XMLsyntax
Hi,
I have noticed that trang is converting comments between both syntaxes
nicely except when they happen in a text only pattern. For example:
<element name="born">
<data type="date">
<param name="minInclusive">1900-01-01</param>
<param name="maxInclusive">2099-12-31</param>
<param name="pattern">
<!-- We don't want timezones in our dates. -->
[0-9]{4}-[0-9]{2}-[0-9]{2}
</param>
</data>
</element>
gives:
element born {
xsd:date {
minInclusive = "1900-01-01"
maxInclusive = "2099-12-31"
pattern =
"\x{a}" ~
" \x{a}" ~
" [0-9]{4}-[0-9]{2}-[0-9]{2}\x{a}" ~
" "
}
}
(the comment is trashed)
and
element born {
xsd:date {
minInclusive = "1900-01-01"
maxInclusive = "2099-12-31"
pattern =
# We don't want timezones in our dates.
"[0-9]{4}-[0-9]{2}-[0-9]{2}\x{a}"
}
}
gives:
<element name="born">
<data type="date">
<param name="minInclusive">1900-01-01</param>
<param name="maxInclusive">2099-12-31</param>
<param name="pattern">[0-9]{4}-[0-9]{2}-[0-9]{2}
</param>
</data>
<!-- We don't want timezones in our dates. -->
</element>
<optional>
(the location of the comment has been changed).
Is this just a (minor) bug or is there something I have missed with
comments in the compact syntax?
Thanks
Eric
--
Curious about Relax NG? My book in progress is waiting for your review!
http://books.xmlschemata.org/relaxng/
------------------------------------------------------------------------
Eric van der Vlist http://xmlfr.org http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------
← Prev in month
← Prev in thread