Subject: RE: [xsl] Storing HTML in XML From: timw@xxxxxxx Date: Fri, 7 Sep 2001 07:51:15 +1000 |
> -----Original Message----- > From: wbchmura@xxxxxxxxxxxxxxxxxxxxxx > You want to use: > > <xsl:copy-of select="title/node()" /> > > To get it out. See the thread "Re: [xsl] Question with > xsl:copy-of and xsl:value-of". > > if you dont do it this way it will be outputting <myfile> as > part of the > result. > I think you are refering to an message from Mike Kay where someone asked how to extract the contents of the <title> tag with the enclosed nodes intact from the following XML <resource name="p_msc" type="packagingbulletin" format="pdf"> <title>P <small><sup>®</sup></small> MS (MSC)series Canadian Packaging Bulletin</title> <link>pkb_can_msc.pdf</link> </resource> MK> If the <title> is the current node, do <xsl:copy-of select="node()"/> to MK> copy its children. He also could have said <xsl:copy-of select="."/>, or equally "If the <title> ISNT the current node, do <xsl:copy-of select="the_path/title"/> to copy its children." In other words, the node() isn't required. - I use copy-of in this way often and have not needed to use it. But you have correctly pointed out that to extract the nodes within the selected element, xsl:value-of won't work, and xsl:copy-of is required to do a deep copy. Tim XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Storing HTML in XML, Utah Ingersoll | Thread | RE: [xsl] Storing HTML in XML, Michael Kay |
RE: [xsl] FOO vs FO, DuCharme, Bob (LNG) | Date | RE: [xsl] XSLT browser support, George Hill |
Month |