xsl-list
[Top] [All Lists]

Re: Convert a XML string to a node

2005-03-23 03:21:47
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, António Mota <amsmota(_at_)gmail(_dot_)com> 
wrote:
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.


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--