Omit showing XML elements in content assist, which are not a
Oxygen general issues.
-
- Posts: 206
- Joined: Thu Dec 01, 2011 4:22 pm
- Location: Hamburg, Germany
Omit showing XML elements in content assist, which are not a
Hello,
We have a DTD, which defines a certain order of the child elements of a XML element, but all the childelements are optional.
The problem we just faced is that the content assist and the elements view also offers those XML elements, which would cause a validation error, because of a wrong order.
Example:
If the cursor is behind the <action> element the content assist still offers to insert an <actiondescription> element and when an <actiondescription> element is inserted after the <action> element a validation error is shown:
In my opinion the content assist and the elements view should not even offer to insert an <actiondescription> element after the <action> element, when it will cause a validation error.
Is this a missing feature or did I configure something wrong?
Best regards,
Simon
We have a DTD, which defines a certain order of the child elements of a XML element, but all the childelements are optional.
The problem we just faced is that the content assist and the elements view also offers those XML elements, which would cause a validation error, because of a wrong order.
Example:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//PI-MOD//DTD PI-Mod V1.2.2//EN" "pi-mod.dtd">
<task><heading>Sample Task Module</heading>
<task_body>
<actiondescription>
<paragraph/>
</actiondescription>
<action>
<step/>
</action>
</task_body></task>
Code: Select all
The content of element type "task_body" is incomplete, it must match "(((actiondescription|safetyadvice)*,action,or-action*,result?,troubleshooting*,note*)+,actionsequenceend?,outlook?)".
Is this a missing feature or did I configure something wrong?
Best regards,
Simon
Simon Scholz
vogella GmbH
http://www.vogella.com
vogella GmbH
http://www.vogella.com
-
- Posts: 9445
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Omit showing XML elements in content assist, which are n
Hi Simon,
Could you send us (support@oxygenxml.com) a sample XML + the PI-MOD DTDs?
It would make testing on our side easier.
Regards,
Radu
Could you send us (support@oxygenxml.com) a sample XML + the PI-MOD DTDs?
It would make testing on our side easier.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9445
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Omit showing XML elements in content assist, which are n
Hi Simon,
Thanks for the samples.
The content model in the DTD of the task_body element is something like:
The + sign there indicates that the task_body can have one or more sequences of (actiondescription, action, ... note) tags.
So for example this XML is valid:
So the editor is correct in proposing the entries because the DTD is very relaxed, the validation error you obtain says that the content of "actiondescription" is incomplete and needs to be filled further.
Regards,
Radu
Thanks for the samples.
The content model in the DTD of the task_body element is something like:
Code: Select all
<!ENTITY % cm.task_body "
(((actiondescription | safetyadvice)*, action, or-action*, result?, troubleshooting*, note*)+, actionsequenceend?, outlook?)
">
So for example this XML is valid:
Code: Select all
<task>
<heading>Sample Task Module</heading>
<task_body>
<actiondescription>
<paragraph/>
</actiondescription>
<action>
<step/>
</action>
<!--And here we can repeat again the sequence (the + sign in the content model)-->
<actiondescription>
<footnote></footnote>
</actiondescription>
<action>
<step></step>
</action>
</task_body>
</task>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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