Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Including parseable HTML tags, using XML/DTD/XSL ??

Status
Not open for further replies.

pain4u

Technical User
Jun 26, 2001
64
US
I have tried many different forms of doing this and none of them work, everything from using <![CDATA[]]> sections, creating a <!ELEMENT br EMPTY> in the DTD, <!ENTITY br &quot;<br>&quot;> in the DTD, to using disable-output-escaping=&quot;yes&quot; in the XSL.

So far the only fix I have come to realize is actually separating each breaked section/paragraph into individual XML elements and then processing & inserting the <br/> tag via an XSL template. -- I would very much like to avoid doing this if possible!!

All I want to do is to include a simple <br> tag in the value of the xml element to then be parsed by the browser as HTML. I am using the basic XML/DTD/XSL schema...MSXML, but I'm using version 1.0 syntax.

Please let me know!
Thanks in advance. - pain4u
 
Instead of xsl:value-of, use either xsl:copy-of or xsl:copy with identity templates, pending your need.
<tagwithbothhtmlandxml>
xsl:copy
xsl:apply-templates

<tagwithonlyhtml>
xsl:copy-of


 
Well, I tried using xsl:copy-of before, it didn't fix my problem but I may have just did something incorrectly. In any case...I decided to just manually break apart all the individual break points in the element into child elements (XSLT then added the <br/> tags). I really didn't want to do that but I didn't have the time to wait and hear back from some one on these forums.

Thanks for the info though! I will give it a try, when I can. :) - pain4u
 
Have you tried replacing
Code:
<br/>
with
Code:
&lt;br/&lt;
 
Please excuse the technical difficulties ;-) let's try that again.....

Have you tried the &quot;<&quot; and the &quot;>&quot; with their individual entity references? So, use &quot;& lt ;&quot; in place of &quot;<&quot; and &quot;& gt ;&quot; in place of &quot;>&quot;? (Please forgive the extra spaces...)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top