[DTD] default attribute not inserted
Having trouble installing Oxygen? Got a bug to report? Post it all here.
[DTD] default attribute not inserted
Post by jfix »
Hi, first post, search didn't yield anything.
I have a DTD which defines an attribute "Type" which can have two different values, one of them being the default value (see code snippet).
I would have expected [1] that when I insert the Intervention element that the Type attribute is automatically inserted as well, and has the value "CensoredTime". Am I wrong?
If this is not possbile using a DTD, could this be solved by using Relax NG?
Thanks,
Jakob.
[1] http://www.w3.org/TR/2000/REC-xml-20001006#attdecls
PS: Oh, we bought two licenses today. Thanks for a great product!
I have a DTD which defines an attribute "Type" which can have two different values, one of them being the default value (see code snippet).
Code: Select all
<!ATTLIST Intervention
Type (FailureTime|CensoredTime) "CensoredTime"
>
If this is not possbile using a DTD, could this be solved by using Relax NG?
Thanks,
Jakob.
[1] http://www.w3.org/TR/2000/REC-xml-20001006#attdecls
PS: Oh, we bought two licenses today. Thanks for a great product!
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi Jakob,
No, the editor should not insert that attribute automatically. Actually this is exactly the point with default attributes, if they are not specified the document is equivalent with a document that specifies them with the default value. Oxygen will offer the attribute in the content completion list and will list the values when you enter the attribute value. See more information about default attributes at
http://www.w3.org/TR/2000/REC-xml-20001006#dt-default
George
No, the editor should not insert that attribute automatically. Actually this is exactly the point with default attributes, if they are not specified the document is equivalent with a document that specifies them with the default value. Oxygen will offer the attribute in the content completion list and will list the values when you enter the attribute value. See more information about default attributes at
http://www.w3.org/TR/2000/REC-xml-20001006#dt-default
Best Regards,If a default value is declared, when an XML processor encounters an omitted attribute, it is to behave as though the attribute were present with the declared default value.
George
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service