[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Comparing attributes and setting the values

Subject: Re: Comparing attributes and setting the values
From: "Wendell Piez wapiez@xxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 21 Aug 2014 18:34:23 -0000
Re:  Comparing attributes and setting the values
Varun,

It is impossible to help without more information from you.

Do you have any templates matching "Item"? If so, what do they say?

Do we know for a fact that your templates are matching successfully?
What kind of output are you getting and how is it not yet correct?

Regards, Wendell


On Thu, Aug 21, 2014 at 5:28 AM, varun bhatnagar varun292006@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> Hi,
> To join all the Item elements I tried using copy and copy-to elements of
xsl
> and then I applied the template rules but it did not work.
>
>  <xsl:template match="/">
>          <A>
>             <target>
> <xsl:copy>
>                  <xsl:apply-templates select="//Item"/>
>                  <xsl:apply-templates
> select="document('File2.xml')/*//Item"/>
> </xsl:copy>
>              </target>
>          </A>
>      </xsl:template>
>
> Is this the correct way of doing it? Could anyone please help, I am not
able
> to proceed :(
>
> Thanks,
> BR,
> Varun
>
>
> On Tue, Aug 19, 2014 at 1:11 PM, varun bhatnagar varun292006@xxxxxxxxx
> <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>>
>> I am sorry I am bit new to xslt but isn't the / template joining all the
>> Item elements?
>>
>>  <xsl:template match="/">
>>          <A>
>>             <target>
>>                  <xsl:apply-templates select="//Item"/>
>>                  <xsl:apply-templates
>> select="document('File2.xml')/*//Item"/>
>>              </target>
>>          </A>
>>      </xsl:template>
>>  </xsl:stylesheet>
>>
>> Regards,
>> Varun
>>
>>
>> On Tue, Aug 19, 2014 at 11:43 AM, Michael MC<ller-Hillebrand mmh@xxxxxxxxx
>> <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>>>
>>> Am 19.08.2014 um 10:33 schrieb varun bhatnagar:
>>>
>>> > <xsl:template match="/">
>>> >         <A>
>>> >             <target>
>>> >                 <xsl:apply-templates select="//Item"/>
>>> >                 <xsl:apply-templates
>>> > select="document('File2.xml')/*//Item"/>
>>> >             </target>
>>> >         </A>
>>> >     </xsl:template>
>>> > </xsl:stylesheet>
>>>
>>> > But it is not coming this way. It starts from 1 again for the second
>>> > file. I want to be sequential.
>>> > What can I do for that?
>>>
>>> Without even understanding what your codebs logic is trying to do this
is
>>> what I would expect. I would not expect the preceding:: axis to
>>> automagically work across any number of sequential xsl:apply-templates.
>>>
>>> It seems to me you must use a two-step approach by first joining all
>>> <Item> into a single root element.
>>>
>>> - Michael
>>>
>>
>> XSL-List info and archive
>> EasyUnsubscribe (by email)
>
>
> XSL-List info and archive
> EasyUnsubscribe (by email)



--
Wendell Piez | http://www.wendellpiez.com
XML | XSLT | electronic publishing
Eat Your Vegetables
_____oo_________o_o___ooooo____ooooooo_^

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.