Elements view: surrounding with tag / inserting the tag on doubleclick
Are you missing a feature? Request its implementation here.
-
- Posts: 32
- Joined: Fri Aug 05, 2011 8:27 pm
Elements view: surrounding with tag / inserting the tag on doubleclick
Dear oXygen community,
I personally find that oXygen Elements view (Window → Show view → Other... → oXygen XML → Elements) is not useful: it shows the elements allowed at current caret position (super), but how to apply the element?!?
Suggestion:
- When the text is selected and selection allows the tag insertion (selection encloses the valid XML fragment), doubleclicking of the tag same in Elements view should perform "surround with tag" action.
- When there is no selection, the start tag is inserted.
That is at least some use from this list.
Additional info:
oXygen XML Editor and XSLT Debugger v12.1.0.v2011031114
Eclipse Helios SR2 v3.6.2.r362_v20110210
I personally find that oXygen Elements view (Window → Show view → Other... → oXygen XML → Elements) is not useful: it shows the elements allowed at current caret position (super), but how to apply the element?!?
Suggestion:
- When the text is selected and selection allows the tag insertion (selection encloses the valid XML fragment), doubleclicking of the tag same in Elements view should perform "surround with tag" action.
- When there is no selection, the start tag is inserted.
That is at least some use from this list.
Additional info:
oXygen XML Editor and XSLT Debugger v12.1.0.v2011031114
Eclipse Helios SR2 v3.6.2.r362_v20110210
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Elements view: surrounding with tag / inserting the tag on doubleclick
Hello,
Both these features are already implemented in the Elements view in v12.2("surround with element" and "insert element"), but I believe they have been implemented a long time ago so they should work in v12.1 as well.
In what context are you using the Elements view, what type of file are you editing(XML, XSD)? Can you give an example of a context/file where this doesn't work?
Note that elements that are gray(instead of black) are not available in the current context even if they are available in the current element.
Regards,
Adrian
Both these features are already implemented in the Elements view in v12.2("surround with element" and "insert element"), but I believe they have been implemented a long time ago so they should work in v12.1 as well.
In what context are you using the Elements view, what type of file are you editing(XML, XSD)? Can you give an example of a context/file where this doesn't work?
Note that elements that are gray(instead of black) are not available in the current context even if they are available in the current element.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 32
- Joined: Fri Aug 05, 2011 8:27 pm
Re: Elements view: surrounding with tag / inserting the tag on doubleclick
Ah, grayed! I have this very case.... What does it mean "not available in the current context"?adrian wrote:Note that elements that are gray(instead of black) are not available in the current context even if they are available in the current element.
In my case the <author> inside <bibl> is perfectly OK, but all nodes are grayed:

Here is the referred example.html
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Elements view: surrounding with tag / inserting the tag on doubleclick
"not available in the current context" means that the schema doesn't allow the element in that context(in that parent element).
e.g.
If you have a sequence of optional elements defined in a schema: a, b, c
after omitting a and adding b you can only add c not another b(already present) or a(can only be inserted before b).
Your example is an XHTML document with embedded TEI, however the associated schema only covers TEI and Oxygen does not validate the XHTML side of it. As a result the embedded TEI snippets don't have the proper context so both the content completion(when editing) and Elements view don't work as expected.
Regards,
Adrian
e.g.
If you have a sequence of optional elements defined in a schema: a, b, c
after omitting a and adding b you can only add c not another b(already present) or a(can only be inserted before b).
Your example is an XHTML document with embedded TEI, however the associated schema only covers TEI and Oxygen does not validate the XHTML side of it. As a result the embedded TEI snippets don't have the proper context so both the content completion(when editing) and Elements view don't work as expected.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 32
- Joined: Fri Aug 05, 2011 8:27 pm
Re: Elements view: surrounding with tag / inserting the tag on doubleclick
I think, this is a string limitation: it limits the oXygen functionality to only perfectly valid XML. Even if I enable the XHTML XSD, my XML won't be valid, because HTML tags do not allow anything non-HTML so I need to hack XHTML XSD... Currently the functionality of Elements view and Surround with Tags is useless for me. To my opinion it's better to enable (probably incorrect) tags which are possible in current context, rather then disable them all. I think that choosing the right context in this case is perfectly possible.adrian wrote:Your example is an XHTML document with embedded TEI, however the associated schema only covers TEI and Oxygen does not validate the XHTML side of it. As a result the embedded TEI snippets don't have the proper context so both the content completion(when editing) and Elements view don't work as expected.
Suggestion: oXygen should recover the context despite of schema errors.
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Re: Elements view: surrounding with tag / inserting the tag on doubleclick
You need an NVDL script that describes how the HTML and the TEI languages are combined, referring each to its schema. oXygen supports NVDL and it will offer you the elements from both schemas.
Best Regards,
George
Best Regards,
George
George Cristian Bina
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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