xslt text transformation and special characters
Oxygen general issues.
			- 
				jolla
 - Posts: 1
 - Joined: Thu May 12, 2016 6:11 pm
 
xslt text transformation and special characters
I transform an XML document to text. Sometimes it has for example < in the text wich arrives as <
But I want to keep this as < in the text output.
If I do nothing it comes out as <.
If I try to change it to < it comes out as that.
			
			
									
									
						But I want to keep this as < in the text output.
If I do nothing it comes out as <.
If I try to change it to < it comes out as that.
- 
				adrian
 - Posts: 2894
 - Joined: Tue May 17, 2005 4:01 pm
 
Re: xslt text transformation and special characters
Hi,
You can control the output from the XSL.
If you use <xsl:output method="xml"/> you will get '<', otherwise, if it's "text", you'll get the actual character, '<'.
If you want < no matter what, you can use a character map.
Regards,
Adrian
			
			
									
									You can control the output from the XSL.
If you use <xsl:output method="xml"/> you will get '<', otherwise, if it's "text", you'll get the actual character, '<'.
If you want < no matter what, you can use a character map.
Code: Select all
    <xsl:output method="text" use-character-maps="mymap"/>
    <xsl:character-map name="mymap">
        <xsl:output-character character="<" string="<"/>
    </xsl:character-map>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
			
				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