xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Steve Loughran <steve.loughran AT gmail.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 23:13:58 +0100
On 10/25/05, David Forslund <forslund AT mail.com> wrote:
> This didn't seem to work. I can put in some data, but I need to check
> if object is coming in with existing data and not append some text to
> it, as sometimes
> it is already partially completed (in other words, I want to be able to
> edit the information that already exists from a previous time).
>
> thanks,
>
> Dave
> Robert Koberg wrote:
>
> > 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
> >
> >
It is interesting that it works in DOM but not Xom. Could you convert
it a DOM graph and then feed it through XSL? I know that seems like a
failure mode for in-memory-XML, but as my own code is known to covert
it to text to hand it off to something else (Axis2), a DOM graph is
still fairly elegant in comparision.
-steve
-
[XOM-interest] Question about XSL,
David Forslund, 10/25/2005
-
Re: [XOM-interest] Question about XSL,
Steve Loughran, 10/25/2005
- Re: [XOM-interest] Question about XSL, David Forslund, 10/25/2005
-
Re: [XOM-interest] Question about XSL,
Robert Koberg, 10/25/2005
-
Re: [XOM-interest] Question about XSL,
David Forslund, 10/25/2005
- Re: [XOM-interest] Question about XSL, Robert Koberg, 10/25/2005
-
Re: [XOM-interest] Question about XSL,
Steve Loughran, 10/25/2005
- Re: [XOM-interest] Question about XSL, Elliotte Harold, 10/30/2005
-
Re: [XOM-interest] Question about XSL,
David Forslund, 10/25/2005
-
Re: [XOM-interest] Question about XSL,
Steve Loughran, 10/25/2005
Archive powered by MHonArc 2.6.24.