HTML in attribute of a node
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 3
- Joined: Tue Jan 29, 2008 4:47 pm
HTML in attribute of a node
Hello!
I'm having some problems generating HTML with a xslt. I have a XML with some html code in a node attribute. For example
XML:
(I didn't escape the < and > just to make it more readable.)
And this is my xslt:
This is what I get:
As you can see, the html code from the attribute is not read as html in the browser.
Is there a way to make html code from an attribute node?
PS: Sorry for my english :S
I'm having some problems generating HTML with a xslt. I have a XML with some html code in a node attribute. For example
XML:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<root>
<guidance gui_content="<div> <b>Hello, this is a test</b> </div>" />
</root>
And this is my xslt:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
<xsl:output method="html" indent="yes"/>
<xsl:template match="/">
<xsl:call-template name="dvt_1.rowview" />
</xsl:template>
<xsl:template name="dvt_1.rowview">
<p style="font-weight:bold; text-align:center; font-size:10pt;">
<xsl:variable name="fieldValue">
<xsl:value-of select="/root/guidance/@gui_content" />
</xsl:variable>
<xsl:copy-of select="$fieldValue" />
</p>
</xsl:template>
</xsl:stylesheet>
Code: Select all
<div> <b>Hello, this is a test</b> </div>
Is there a way to make html code from an attribute node?
PS: Sorry for my english :S
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