'Re: "Re: [xslt] XPath expression question"'
- From: Kasimier Buchcik <kbuchcik 4commerce de>
- To: <xslt gnome org>
- Subject: 'Re: "Re: [xslt] XPath expression question"'
- Date: Wed, 14 Apr 2004 11:18:32 +0200
Hi,
on 4/14/2004 11:07 AM Bernhard Zwischenbrugger wrote:
> Hi Vladimir
>
> Try this:
>
>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:template match="/">
> <result>
> <xsl:copy-of select="/mixed/*|/mixed/text()"/>
> </result>
> </xsl:template>
>
> </xsl:stylesheet>
>
> Bernhard
You may want to use the following as well:
<xsl:copy-of select="/mixed/child::node()"/>
It selects all child nodes, regardless which type.
>>Please help
>>How I can make copy-of for all children of current node, including text
>>blocks ?
>>
>>My example:
>>
>><mixed>
>> <subnode1/>
>> text
>> <subnode2>
>> sub-text
>> </subnode2>
>> another text
>></mixed>
>>
>>with XSLT transformation:
>>
>><xsl:template match="/">
>> <result>
>> <xsl:copy-of select="/mixed/*"/>
>> </result>
>></xsl:template>
>>
>>I will get only sub-nodes of mixed, but How I can get all contents
>>including text blocks ?
>>
>>I get:
>><result>
>> <subnode1/>
>> <subnode2>
>> sub-text
>> </subnode2>
>></result>
>>
>>I need:
>><result>
>> <subnode1/>
>> text
>> <subnode2>
>> sub-text
>> </subnode2>
>> another text
>></result>
Kasimier
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]