W3C home > Mailing lists > Public > www-xsl-fo@w3.org > September 2002

Re: XSL Help - Urgent

From: Mike Haarman <mhaarman@infinitecampus.org>
Date: Fri, 27 Sep 2002 09:32:48 -0500
Message-ID: <002201c26632$c0827bd0$78027941@infinitecampus.org>
To: <www-xsl-fo@w3.org>, "Vignesh Balan R" <vigneshbr@aztec.soft.net>

This is a question for the XSL list at mulberrytech.com

However, the following should do the trick:

<xsl:copy-of select="modify-attr[@attr-name='ROLE']/add-value"/>

This will perform a deep copy, selecting the *add-value* node and all its
decendants.

Mike

----- Original Message -----
From: "Vignesh Balan R" <vigneshbr@aztec.soft.net>
To: <www-xsl-fo@w3.org>
Sent: Wednesday, September 25, 2002 12:36 PM
Subject: XSL Help - Urgent


> Hi All
>
> We have a XML file as the input , which would look like this,
>
>
> <nds dtdversion="1.0" ndsversion="8.5" xmlns:jdbc=" urn:dirxml:jdbc
> <urn:dirxml:jdbc> ">
>         <source>
>                 <product jdbc:build="20020215_1810"
> jdbc:instance="JDBCdriver" version="1.5">DirXML Driver for
> JDBC</product>
>                 <contact>Novell, Inc.</contact>
>         </source>
>         <input>
>                 <modify class-name="VIEW_INTMEDTAB"
> event-id="modify:PK_ID=staff7,table=VIEW_INTMEDTAB,schema=OUHKDIRXML"
> src-dn="PK_ID=staff7,table=VIEW_INTMEDTAB,schema=OUHKDIRXML">
>                         <association
> state="associated">PK_ID=staff7,table=VIEW_INTMEDTAB,schema=OUHKDIRXML</
> association>
>                         <modify-attr attr-name="TYPEOFPOST">
>                                 <remove-all-values/>
>                         </modify-attr>
>                         <modify-attr attr-name="TYPEOFPOST">
>                                 <add-value>
>                                         <value
> type="string">Perm</value>
>                                 </add-value>
>                         </modify-attr>
>                         <modify-attr attr-name="LOGINNAME1">
>                                 <remove-all-values/>
>                         </modify-attr>
>                         <modify-attr attr-name="LOGINNAME1">
>                                 <add-value>
>                                         <value
> type="string">staff7</value>
>                                 </add-value>
>                         </modify-attr>
>                         <modify-attr attr-name="ROLE">
>                                 <remove-all-values/>
>                         </modify-attr>
>                        <modify-attr attr-name="ROLE">
>                                 <add-value>
>                                         <value type="string">ole</value>
>
>                                 </add-value>
>                                 <add-value>
>                                         <value
> type="string">staffportal</value>
>                                 </add-value>
>                         </modify-attr>
>                         <modify-attr attr-name="OUTYPE">
>                                 <remove-all-values/>
>                         </modify-attr>
>                         <modify-attr attr-name="OUTYPE">
>                                 <add-value>
>                                         <value
> type="string">staff</value>
>                                 </add-value>
>                         </modify-attr>
>                         <modify-attr attr-name="INTPASSWORD">
>                                 <remove-all-values/>
>                         </modify-attr>
>                 </modify>
>         </input>
> </nds>
>
>
> >From the above XML i want to copy the following text
>                 "<modify-attr attr-name="ROLE">
>                                 <add-value>
>                                         <value type="string">ole</value>
>
>                                 </add-value>
>                                 <add-value>
>                                         <value
> type="string">staffportal</value>
>                                 </add-value>
>                         </modify-attr> "
> into a variable in XSL. I want the whole thing to be stored as a
> text(not only the parsed values, but all the tags too) in the variable.
>
>
> I have tried the following using <xsl:apply-templates>.
> <xsl::apply-templates
> select=" modify-attr[@attr-name='ROLE']/add-value"/>
>
>
> But it doesnt copy the whole text, instead copies only the first
> value("ole" in the above modify-attr).
>
>
> Any pointers of how to do this, would be greatly appreciated.
>
>
> Thanks and Regards
> Vignesh
>
>
> --
> Early bird gets the worm ... Big Incentive !!
>
>
>
Received on Friday, 27 September 2002 10:42:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:09 GMT