-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The alternativeTitlesDomain.rng declares the 'title-role' attribute as required #915
Comments
I tested and Oxygen indeed inserts the attribute like this:
Oxygen would not insert in general the default value of an attribute but in this case the attribute is considered required. I have not seen many situations where an attribute is considered both required and also has a default value in the schema, usually it's either one or the other.
|
We should discuss this at the TC -- per the latest spec, the attribute is indeed required. Looking at Jarno's handy rendering of the latest spec, it's described here: edit: if I'm understanding right, the issue is that when there is a default value, the RNG should not also mark it required -- it's used regardles, so this is just a grammar quirk with no real impact other than tool behaviors like the one in Oxygen. |
Correct. RNG defines default values separately from whether its required. The DTD definition of "title-role" attributes is actually not strictly clear either because it only states a default value instead of explicitly stating #REQUIRED and a default value. Based on Microsoft's DTD reference I would consider the DTD specification a bit vague. It seems like a required attribute with default value is more or less unprecedented in the DITA specification. Correct? I am unable to find any other such attribute in RNG and no uses of #REQUIRED combined with default value in the DTDs. These attributes are all declared optional in the RNG: class, placement, linking (glossref), toc, search, keycol (choicetable), ... The SVG specification is also declaring optional attributes with default value in the RNG. https://learn.microsoft.com/en-us/previous-versions/dotnet/netframework-4.0/ms256140(v=vs.100) |
The alternativeTitlesDomain.rng declares the 'title-role' attribute as required and with a default value. This has 2 negative side-effects:
Declaring title-role attribute as required is inconsistent with most other attributes with a default value.
Thanks!
The text was updated successfully, but these errors were encountered: