Not to display End tag
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 68
- Joined: Mon Jul 04, 2022 8:42 am
Not to display End tag
Hi Oxygen Team,
we are using web author plugin and inserting a xml fragment using below code.
String xmlFragment = <embedded.figure.reference rendition-type='online'/>
authorDocumentController.insertXMLFragment(xmlFragment, authorAccess.getEditorAccess().getCaretOffset());
After insertion of xml fragment, in document we can see the below result
<embedded.figure.reference rendition-type='online'></embedded.figure.reference>
but we don't want end tag </embedded.figure.reference> to display in the document.
instead we want to see only <embedded.figure.reference rendition-type='online'/> tag in the web author doucument.
Please help us how to achieve this.
Thank you.
we are using web author plugin and inserting a xml fragment using below code.
String xmlFragment = <embedded.figure.reference rendition-type='online'/>
authorDocumentController.insertXMLFragment(xmlFragment, authorAccess.getEditorAccess().getCaretOffset());
After insertion of xml fragment, in document we can see the below result
<embedded.figure.reference rendition-type='online'></embedded.figure.reference>
but we don't want end tag </embedded.figure.reference> to display in the document.
instead we want to see only <embedded.figure.reference rendition-type='online'/> tag in the web author doucument.
Please help us how to achieve this.
Thank you.
-
- Posts: 515
- Joined: Wed May 20, 2009 2:40 pm
Re: Not to display End tag
Hello,
When you insert an empty element in the document using the AuthorDocumentController.insertXMLFragment(String, int) API, the tag should be saved in the collapsed form, by default (<embedded.figure.reference rendition-type='online'/> in your case).
Can you please give us more details? Where do you see the empty element expanded (as <embedded.figure.reference rendition-type='online'></embedded.figure.reference>)? In Web Author, in the Author page, or in the Text page (after choosing "Edit as XML")? Or when you open the document in other application?
Best Regards,
Mihaela
When you insert an empty element in the document using the AuthorDocumentController.insertXMLFragment(String, int) API, the tag should be saved in the collapsed form, by default (<embedded.figure.reference rendition-type='online'/> in your case).
Can you please give us more details? Where do you see the empty element expanded (as <embedded.figure.reference rendition-type='online'></embedded.figure.reference>)? In Web Author, in the Author page, or in the Text page (after choosing "Edit as XML")? Or when you open the document in other application?
Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
-
- Posts: 515
- Joined: Wed May 20, 2009 2:40 pm
Re: Not to display End tag
Hello,
In the Author page of the Web Author both start tag and end tag are presented for all the elements, regardless of their serialization.
What you can do is to use the -oxy-display-tags CSS property to hide both tags of the "embedded.figure.reference" elements.
To associate a CSS with your documents you can create a plugin. We already have a sample plugin that imposes a CSS for rendering all XML documents in our Web Author plugin samples repository.
Best Regards,
Mihaela
In the Author page of the Web Author both start tag and end tag are presented for all the elements, regardless of their serialization.
What you can do is to use the -oxy-display-tags CSS property to hide both tags of the "embedded.figure.reference" elements.
To associate a CSS with your documents you can create a plugin. We already have a sample plugin that imposes a CSS for rendering all XML documents in our Web Author plugin samples repository.
Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
-
- Posts: 68
- Joined: Mon Jul 04, 2022 8:42 am
Re: Not to display End tag
Hi Mihaela,
Thank you for the reply.
Actually we don' t want to hide both the gas. Instead we want to hide only end tag.
It should display like below tag in web author.
<embedded.figure.reference rendition-type='online'/>
Thank you for the reply.
Actually we don' t want to hide both the gas. Instead we want to hide only end tag.
It should display like below tag in web author.
<embedded.figure.reference rendition-type='online'/>
-
- Posts: 515
- Joined: Wed May 20, 2009 2:40 pm
Re: Not to display End tag
Hello,
Can you please send us a screenshot with the current display of the element and a picture that explains what you want to obtain, to be sure that we are reffering to the same editor mode?
Thank you,
Mihaela
Can you please send us a screenshot with the current display of the element and a picture that explains what you want to obtain, to be sure that we are reffering to the same editor mode?
Thank you,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
-
- Posts: 68
- Joined: Mon Jul 04, 2022 8:42 am
Re: Not to display End tag
Hi Mihaela,
Please find the below screenshot.
In the below image we don't want to display end tag
Shilpa
Please find the below screenshot.
In the below image we don't want to display end tag
image.png
We want something look like below image.
image.png
RegardsShilpa
You do not have the required permissions to view the files attached to this post.
-
- Posts: 515
- Joined: Wed May 20, 2009 2:40 pm
Re: Not to display End tag
Hi Shilpa,
Thank you for the screenshots and the explanation.
What you can do is to use the -oxy-display-tags CSS that I mentioned to hide the default tags, and then recreate the start tag rendering on a before pseudo-element of embedded.figure.reference element. Note that you can find the attributes of an element by using the oxy_attributes() CSS function.
You can use the browser inspector to see the styles used for the start tag rendering.
Best Regards,
Mihaela
Thank you for the screenshots and the explanation.
What you can do is to use the -oxy-display-tags CSS that I mentioned to hide the default tags, and then recreate the start tag rendering on a before pseudo-element of embedded.figure.reference element. Note that you can find the attributes of an element by using the oxy_attributes() CSS function.
You can use the browser inspector to see the styles used for the start tag rendering.
Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
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