xsl-list
[Top] [All Lists]

Re: write out xml *with* tags for data island inside xsl??

2005-04-21 07:52:14
On jeu, 2005-04-21 at 08:40 -0400, Hardy Merrill wrote:
MSXML4 and ASP.

I'm rendering an XML document with a style sheet and I'm passing a
separate XML document(regions_xmldoc) as a parameter.  I need 
"regions_xmldoc" to be a data island for some javascript in the ASP
page that is doing the rendering.  I tried this in the style sheet:

<xml id="dsoRegions"><xsl:value-of select="$regions_xmldoc"/></xml>
</body>
</html>

As mentioned in the other answers, you should use copy-of instead of
value-of, but also note that the XML rec says that "Names beginning with
the string "xml", or with any string which would match (('X'|'x')
('M'|'m') ('L'|'l')), are reserved for standardization in this or future
versions of this specification."

Replacing <xml> by <_xml> would thus be more kosher...

Eric
-- 
Have you ever thought about unit testing XSLT templates?
                                                     http://xsltunit.org
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


--~------------------------------------------------------------------
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>
--~--