"Soft" indenting on a per-element basis
Are you missing a feature? Request its implementation here.
-
- Posts: 125
- Joined: Mon Jun 09, 2003 6:02 pm
- Location: Charlottesville, Virginia USA
"Soft" indenting on a per-element basis
It would be useful to have an option to indent certain elements in the editor view without inserting an actual linebreak + indentation in the underlying XML. This need arises most often with mixed-content XML, for example using TEI markup. Consider the typical case of marking text that reads "I saw m**y men there", where one editor gives "many" and another editor gives "merry". In TEI you could code this:
This would be much easier to read and edit in this format:
However, adding actual whitespace to the XML would create a false break between the letters of the word many/merry.
If there was a toggle option to add a "soft" indent before <app> and <rdg>, it would make editing easier while preserving correct content.
I know that some XML editors that use style sheets (like epcEdit) make this possible.
Code: Select all
I saw m<app><rdg wit="E1">an</rdg><rdg wit="E2">err</rdg></app>y men there
Code: Select all
I saw m
<app>
<rdg wit="E1">an</rdg>
<rdg wit="E2">err</rdg>
</app>
y men there
If there was a toggle option to add a "soft" indent before <app> and <rdg>, it would make editing easier while preserving correct content.
I know that some XML editors that use style sheets (like epcEdit) make this possible.
-
- Site Admin
- Posts: 2097
- Joined: Thu Jan 09, 2003 2:58 pm
Hi David,
That is very hard to implement in oXygen, currently on format and indent it gives (with hard line breaks):
Now the stylesheet that process this document should know that app has an element only content and should disregard the line breaks. If it does not then you can eventually try creating a stylesheet like:
where yourStylesheet.xsl is the actual stylesheet you are using now and use this new stylesheet in the transformation scenario.
Best Regards,
George
That is very hard to implement in oXygen, currently on format and indent it gives (with hard line breaks):
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<test>I saw m<app>
<rdg wit="E1">an</rdg>
<rdg wit="E2">err</rdg>
</app>y men there</test>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:strip-space elements="app"/>
<xsl:include href="yourStylesheet.xsl"/>
</xsl:stylesheet>
Best Regards,
George
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