[Home] [By Thread] [By Date] [Recent Entries]

  • From: George Cristian Bina <george@o...>
  • To: mozer <xmlizer@g...>
  • Date: Tue, 25 Jun 2013 00:36:36 +0300

Just a comment on Relax NG and default values:

On 6/24/13 6:56 PM, mozer wrote:
>> >
>> >(2) - In W3C's working draft some attributes have a default value, e.g.,
>> >attribute "decimal-separator" of element "decimal-format" has default value
>> >".".
>> >Your schema does not contain any default values, is that for a reason?
> Well, first reason is that Relax NG doesn't support default values.
> But there is a specific extension that could deal with that.

Relax NG itself does not define anything for default values indeed. 
However, the Relax NG DTD compatibility specification defines an 
annotation that can be used to specify a default value, see
http://relaxng.org/compatibility-20011203.html#default-value

I implemented this support on top of Jing in the DITA-NG project
http://code.google.com/p/dita-ng/
This implements DITA in Relax NG and DITA relies at its core on default 
values for the class and domains attributes, so this was a very 
important requirement to be able to use Relax NG for DITA.

In any case, if the specification talks about default values then you 
may consider adding them though an a:defaultValue annotation and leave 
the tools to support that if they want to.

Best Regards,
George
--
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member