comp.text.xml
[Top] [All Lists]

Avoid collapsed tags

Subject: Avoid collapsed tags
From: "Hvid Hat"
Date: Wed, 16 Jul 2008 19:16:05 +0200
Newsgroups: comp.text.xml

I'm using <xsl:copy-of select="content" /> on the following XML:

<?xml version="1.0"?>
<content>
  <p></p>
  <p>This is a paragraph</p>
  <p></p>
  <p>This is another paragraph</p>
</content>

The empty paragraphs, <p></p>, become <p/> when outputted to the browser. 

How can I prevent this? I want to add an empty comment (or something else?)
so the paragraph tags aren't collapsed, eg. <p><!-- --></p>

<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy