Please help in XSLT

2004-09-14 Thread KS.Bhaskar








Hi Everybody,

 Please help. 

 I have a XML file in that I have parent tags and
two child tag.

Example :

 a

 b

 

 /b



 c

 i
/i

 j
/j 

 

 

 /c

 i
/i

 j
/j

 c

  i
/i

 j
/j

 /c

  /a



I need XSLT solutions to:

 1) How I can implement, every repeat of c
I have to combine the content of b.

 2) How I can display the content of i
and j in a single row with : colon as delimiter.



Thanks in advance



Bye,

Bhaskar





 



DISCLAIMER:This message contains privileged and confidential information and is intended only for the individual named.If you are not the intended recipient you should not disseminate,distribute,store,print, copy or deliver this message.Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted,corrupted,lost,destroyed,arrive late or incomplete or contain viruses.The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. 




RE: Please help in XSLT

2004-09-14 Thread jerald.selvaraj








I hope
the following code will fulfill your needs



xsl:for-each
select =a


xsl:value-of select=b


xsl:for-each select=c


xsl:value-of select=I/ : xsl:value-of select=j/


/xsl:for-each

/xsl:for-each




Regards

Jerald S






-Original Message-
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 14, 2004
2:30 PM
To: [EMAIL PROTECTED]
Subject: Please help in XSLT



Hi Everybody,


Please help. 


I have a XML file in that I have parent tags and two child tag.

Example :


a


b





/b




c


i /i


j
/j 








/c


i /i


j /j


c



i /i


j /j


/c


 /a



I need XSLT solutions to:


1) How I can implement, every repeat of c I have to combine the content
of b.


2) How I can display the content of i and j in a single row
with : colon as delimiter.



Thanks in advance



Bye,

Bhaskar








DISCLAIMER:
This message contains privileged and confidential information and is intended
only for the individual named.If you are not the intended recipient you should
not disseminate,distribute,store,print, copy or deliver this message.Please
notify the sender immediately by e-mail if you have received this e-mail by
mistake and delete this e-mail from your system.E-mail transmission cannot be
guaranteed to be secure or error-free as information could be
intercepted,corrupted,lost,destroyed,arrive late or incomplete or contain
viruses.The sender therefore does not accept liability for any errors or
omissions in the contents of this message which arise as a result of e-mail
transmission. If verification is required please request a hard-copy version. 









Confidentiality Notice

The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately
and destroy all copies of this message and any attachments.


RE: Please help in XSLT

2004-09-14 Thread cknell
You didn't give us a clear idea of what the output should look like. For 
example, what XML structure is implied by the content of i and j in a 
single row? Do you want an XML element or simply an unstructured text output? 
The following is a solution to what I guessed your desired output to be. Please 
be specific on the output format if you need more help.

?xml version=1.0 encoding=UTF-8 ?
xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
  xsl:output method=xml indent=yes encoding=UTF-8 /

  xsl:template match=/
xsl:apply-templates /
  /xsl:template

  xsl:template match=a
xsl:apply-templates /
  /xsl:template
  
  xsl:template match=c
c
  xsl:value-of select=.
  xsl:value-of select=preceding-sibling::b /
  xsl:apply-templates /
/c
  /xsl:template
  
  xsl:template match=i
xsl:value-of select=.:xsl:value-of select=following-sibling::j /
  /xsl:template
  
  xsl:template match=b /
  xsl:template match=j /

/xsl:stylesheet
-- 
Charles Knell
[EMAIL PROTECTED] - email



-Original Message-
From: [EMAIL PROTECTED]
Sent: Tue, 14 Sep 2004 14:29:43 +0530
To:   [EMAIL PROTECTED]
Subject:  Please help in XSLT

Hi Everybody,

Please help. 

I have a XML file in that I have parent tags and two child
tag.

Example :

a

b



/b

 

c

i   /i

j   /j   





/c

i   /i

j   /j

c

i   /i

j   /j

/c

/a

 

I need XSLT solutions to:

1) How I can implement, every repeat of c I have to
combine the content of b.

2) How I can display the content of i and j in a single
row with ':' colon as delimiter.

 

Thanks in advance

 

Bye,

Bhaskar

 

 





DISCLAIMER:
This message contains privileged and confidential information and is intended 
only for the individual named.If you are not the intended recipient you should 
not disseminate,distribute,store,print, copy or deliver this message.Please 
notify the sender immediately by e-mail if you have received this e-mail by 
mistake and delete this e-mail from your system.E-mail transmission cannot be 
guaranteed to be secure or error-free as information could be 
intercepted,corrupted,lost,destroyed,arrive late or incomplete or contain 
viruses.The sender therefore does not accept liability for any errors or 
omissions in the contents of this message which arise as a result of e-mail 
transmission. If verification is required please request a hard-copy version.










Hi Everybody,

 Please help. 

 I have a XML file in that I have parent tags and
two child tag.

Example :

 a

 b

 

 /b



 c

 i
/i

 j
/j 

 

 

 /c

 i
/i

 j
/j

 c

  i
/i

 j
/j

 /c

  /a



I need XSLT solutions to:

 1) How I can implement, every repeat of c
I have to combine the content of b.

 2) How I can display the content of i
and j in a single row with : colon as delimiter.



Thanks in advance



Bye,

Bhaskar





 



DISCLAIMER:This message contains privileged and confidential information and is intended only for the individual named.If you are not the intended recipient you should not disseminate,distribute,store,print, copy or deliver this message.Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted,corrupted,lost,destroyed,arrive late or incomplete or contain viruses.The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: Please help in XSLT

2004-09-14 Thread KS.Bhaskar
Hi Charles,

Thanks for your reply.

Now I need some clarification so I am sending the format.

XML content:

 

Curve

CurveLevelInfo

RecoveryRate0.100/RecoveryRate

Liquidity0/Liquidity

DefaultedDate2004-07-22+04:00/DefaultedDate

 
LastUpdate2004-07-22T00:00:00+04:00/LastUpdate

LastUpdateUserwhinbr/LastUpdateUser

TraderFUKUDA/Trader

StatusACTIVE/Status

SectorCONSUMER FINANCE/Sector

CountryJapan/Country

RegionTOKYO/Region

CurveTypeSingle Name/CurveType

BookTOKYO/Book

SourceOfficial/Source

/CurveLevelInfo

SourcedPoint methodology=3

Tenor3Y/Tenor

BidRate0/BidRate

MidRate101./MidRate

OfferRate0/OfferRate

/SourcedPoint

SourcedPoint methodology=3

Tenor2Y/Tenor

BidRate0/BidRate

MidRate89./MidRate

OfferRate0/OfferRate

/SourcedPoint

SourcedPoint methodology=3

Tenor6M/Tenor

BidRate0/BidRate

MidRate65./MidRate

OfferRate0/OfferRate

/SourcedPoint

SourcedPoint methodology=3

Tenor30Y/Tenor

BidRate0/BidRate

MidRate245./MidRate

OfferRate0/OfferRate

/SourcedPoint

SourcedPoint methodology=3

Tenor4Y/Tenor

BidRate0/BidRate

MidRate113./MidRate

OfferRate0/OfferRate

/SourcedPoint

 /curve

 

Expected output is :

 

0.100:0:2004-07-22+04:00:2004-07-22T00:00:00+04:00:whinbr:FUKUDA:ACTIVE:
CONSUMER FINANCE:Japan:TOKYO:Single
Name:TOKYO:Official:3Y::0:101.:0

0.100:0:2004-07-22+04:00:2004-07-22T00:00:00+04:00:whinbr:FUKUDA:ACTIVE:
CONSUMER FINANCE:Japan:TOKYO:Single
Name:TOKYO:Official:2Y:0:89.:0

0.100:0:2004-07-22+04:00:2004-07-22T00:00:00+04:00:whinbr:FUKUDA:ACTIVE:
CONSUMER FINANCE:Japan:TOKYO:Single
Name:TOKYO:Official:6M:0:65.:0

0.100:0:2004-07-22+04:00:2004-07-22T00:00:00+04:00:whinbr:FUKUDA:ACTIVE:
CONSUMER FINANCE:Japan:TOKYO:Single
Name:TOKYO:Official:30Y:0:245.:0

0.100:0:2004-07-22+04:00:2004-07-22T00:00:00+04:00:whinbr:FUKUDA:ACTIVE:
CONSUMER FINANCE:Japan:TOKYO:Single
Name:TOKYO:Official:4Y:0:113.:0

 

Here every repeat of tag SourcePoint and have append the content of
tag CurveLevelInfo.


With Regards,
Bhaskar

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 14, 2004 5:36 PM
To: [EMAIL PROTECTED]
Subject: RE: Please help in XSLT

You didn't give us a clear idea of what the output should look like. For
example, what XML structure is implied by the content of i and j in
a single row? Do you want an XML element or simply an unstructured text
output? The following is a solution to what I guessed your desired
output to be. Please be specific on the output format if you need more
help.

?xml version=1.0 encoding=UTF-8 ?
xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
  xsl:output method=xml indent=yes encoding=UTF-8 /

  xsl:template match=/
xsl:apply-templates /
  /xsl:template

  xsl:template match=a
xsl:apply-templates /
  /xsl:template
  
  xsl:template match=c
c
  xsl:value-of select=.
  xsl:value-of select=preceding-sibling::b /
  xsl:apply-templates /
/c
  /xsl:template
  
  xsl:template match=i
xsl:value-of select=.:xsl:value-of
select=following-sibling::j /
  /xsl:template
  
  xsl:template match=b /
  xsl:template match=j /

/xsl:stylesheet
-- 
Charles Knell
[EMAIL PROTECTED] - email



-Original Message-
From: [EMAIL PROTECTED]
Sent: Tue, 14 Sep 2004 14:29:43 +0530
To:   [EMAIL PROTECTED]
Subject:  Please help in XSLT

Hi Everybody,

Please help. 

I have a XML file in that I have parent tags and two child
tag.

Example :

a

b



/b

 

c

i   /i

j   /j