whitespace problem
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 31
- Joined: Wed Jun 04, 2003 2:24 am
whitespace problem
If, in a stylesheet, I try to create a variable for outputting a text carriage return, like so:
<xsl:variable name="newline"><xsl:text>
</xsl:text></xsl:variable>
The next time I open the document in oxygen, or pretty-print it, Oxygen incorrectly collapses this to:
<xsl:variable name="newline">
<xsl:text/>
</xsl:variable>
I believe this a bug, since a carriage return inside xsl:text should be treated as text, and not as if xsl:text element were empty. I believe the behavior should be the same even without the text element.
-n.
<xsl:variable name="newline"><xsl:text>
</xsl:text></xsl:variable>
The next time I open the document in oxygen, or pretty-print it, Oxygen incorrectly collapses this to:
<xsl:variable name="newline">
<xsl:text/>
</xsl:variable>
I believe this a bug, since a carriage return inside xsl:text should be treated as text, and not as if xsl:text element were empty. I believe the behavior should be the same even without the text element.
-n.
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi,
Oxygen handles the xml:space attribute. Using xml:space="preserve" will keep the spaces. The xml:space attribute is inherited from the first parent element that defines it. If you want spaces not to be preserved use xml:space="default" to reset the preserve value.
Best Regards,
George
Oxygen handles the xml:space attribute. Using xml:space="preserve" will keep the spaces. The xml:space attribute is inherited from the first parent element that defines it. If you want spaces not to be preserved use xml:space="default" to reset the preserve value.
Code: Select all
<xsl:variable name="newline" xml:space="preserve"><xsl:text>
</xsl:text></xsl:variable>
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