Omit showing XML elements in content assist, which are not a
Posted: Tue Apr 30, 2013 11:22 am
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