Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Question about XSL

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Robert Koberg <rob AT koberg.com>
  • To: David Forslund <forslund AT mail.com>
  • Cc: xom-interest <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] Question about XSL
  • Date: Tue, 25 Oct 2005 15:38:11 -0400

David Forslund wrote:
> I'm transforming an XML file with an XSLT file to create HTML. When I
> use the DOM I get <textarea ...></textarea>
> when I use XOM I get <textarea ../> instead. (This is the case when
> there is nothing in the textarea to begin with). This is certainly
> legitimate xml but browsers fail to terminate the <textarea> element
> (Firefox and IE). I've not figured out how to get the <textarea
> ...></textarea> to be generated by XOM. (I'm using 1.1b5). Any
> suggestions?

You could try to put xml:space="preserve" on the source XML or match the the textarea:

<xsl:template match="textarea">
<textarea xml:space="preserve">
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</textarea>
</xsl:template>

I'd be curious to know if either of those work with XOM.

At worst, you could stick in a comment with a space... I usually put in some default text (if empty) and on onclick empty it with javascript for entry.

This is a pain in general with outputting XHTML with XSL 1.

best,
-Rob




Archive powered by MHonArc 2.6.24.

Top of Page