[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Re: Convert a XML string to a node

Subject: Re: Re: Convert a XML string to a node
From: António Mota <amsmota@xxxxxxxxx>
Date: Wed, 23 Mar 2005 11:00:21 +0000
convert dom to string
Ofcourse that's the solution, what was i thinking...

Since i've made a lot of other things by calling xslt with params, i
went straight to that. There are cases where i need that, but between
the two solutions i think i can cover all the cases...

Thanks for pointing the (not so for me) obvious solution.

On Wed, 23 Mar 2005 12:31:59 +0200, Emmanouil Batsis
<Emmanouil.Batsis@xxxxxxxxxxx> wrote:
> AFAIK there's already a bug for this on bugzilla in mozilla.org (meaning
> passing DOM objects as params). For now, i dont see the problem in your
> usecase, since the DOM you want to add is not dependent in any way to
> the transformation. Just use regular DOM methods to inject the fragment
> in the transformation result tree.
> hth,
> Manos
> Antsnio Mota wrote:
> >Well, let me add some info. I have this xsl:
> >
> >       <xsl:param name="nnode" select="/.."/>
> >
> >       <xsl:template match="/*">
> >               <xsl:copy>
> >                       <xsl:apply-templates/>
> >                       <xsl:copy-of select="$nnode"/>
> >               </xsl:copy>
> >       </xsl:template>
> >
> >       <xsl:template match="node()|@*">
> >               <xsl:copy>
> >                       <xsl:apply-templates select="@*|node()"/>
> >               </xsl:copy>
> >       </xsl:template>
> >
> >and what i wish to acomplish is to insert at the root level any tree
> >structure that's passed to the param (polimorphism, how i like that
> >word!).
> >
> >Since it seems i can't do that on FF, i was thinking in some sort of
> >alternative, maybe using some kind of document() or some xsl template
> >that parse the node tags in a string containing the xml and creating
> >the output nodes or whatever...
> >
> >I'm a bit frustated with all this effort i'm putting in making my apps
> >cross-browser, at least to IE and FF, but sometimes it seems it's too
> >much overhead in it. Maybe i just give up, sold my soul to the forces
> >of darkness and use only IE...
> >
> >
> >
> >On Tue, 22 Mar 2005 23:12:16 +0000, Antsnio Mota <amsmota@xxxxxxxxx>
> >
> >
> >>I have this situation where i'm creating a DOM doc in Javascript and
> >>adding some nodes to it, that i want to pass to a param in a XSLT.
> >>
> >>It works ok in IE, but it seems not in FF
> >>(https://bugzilla.mozilla.org/show_bug.cgi?id=248025)
> >>
> >>So can i pass this as a string instead and converting it to a node so
> >>i can include it in my result tree?
> >>
> >>Since i'm working on the browser i can't use extensions, so it seems
> >>i'm on a dead end in  here.
> >>
> >>Does someone have any thoughts?
> >>
> >>Thanks.

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.