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

Problem writing XSLT

Subject: Problem writing XSLT
From: Mukul <mukulw3@xxxxxxxxx>
Date: Thu, 12 Jun 2003 19:01:35 -0700 (PDT)
writing xslt
Hello,

I have an XML file in the form below. 
 
 <trace> 
 <LEVEL>FLOW</LEVEL> 
 <TIME>2003-05-06 09:57:59:9567238</TIME> 
 <TICKS>631878118799567238</TICKS> 
 <COMPONENT>NS</COMPONENT> 
 <SUBCOMPONENT>NS_SVC</SUBCOMPONENT> 
 <ENTRY type="ProcEntry"> 
 <Datum name="Method">Init</Datum> 
 </ENTRY> 
 </trace> 

 <trace> 
 <LEVEL>FLOW</LEVEL> 
 <TIME>2003-05-06 09:58:00:2830701</TIME> 
 <TICKS>631878118802830701</TICKS> 
 <COMPONENT>NS</COMPONENT> 
 <SUBCOMPONENT>NS_SVC</SUBCOMPONENT> 
 <ENTRY type="ProcEntry"> 
 <Datum name="Method">InitMgmt</Datum> 
 </ENTRY> 
 </trace> 

 <trace> 
 <LEVEL>FULL</LEVEL> 
 <TIME>2003-05-06 09:58:00:2830701</TIME> 
 <TICKS>631878118802830701</TICKS> 
 <COMPONENT>NS</COMPONENT> 
 <SUBCOMPONENT>NS_SVC</SUBCOMPONENT> 
 <ENTRY type="ProcEntry"> 
 <Datum name="Adapter">SA</Datum> 
 <Datum name="Method">ServiceabilityAgent</Datum> 
 </ENTRY>
 </trace> 
 
I need to make an XSL file in 
such a way so that resulted o/p will be in the
following given below. 

 
 <Query>
 <Data> insert into 
table(LEVEL,TIME,TICKS,COMPONENT,SUBCOMPONENT,Method)
 values('FLOW',2003-05-06

09:58:00:2830701,631878118799567238,NS,SVC,Init)</Data>
 <Data> insert into

table(LEVEL,TIME,TICKS,COMPONENTS,SUBCOMPONENTS,Adapter,Method)
 values('FLOW',2003-05-06
09:58:00:2830701,631878118799567238,NS,SVC,SA,ServiceabilityAgent)</Data>
 </Query>
  
Pls note --
1 - each <trace> tag will generate a SQL in the
corresponding <data> tag 
2 - the value of columns of the SQL will come from
<LEVEL>, <TIME>, <TICKS>, <COMPONENT>, <SUBCOMPONENT>
and attribute values of <Datum> tag for e.g. Adapter
and Method. The table name is a constant.
3 - values of table columns will be corresponding
values of these tags
 
I'll appreciate a response to the above problem..

Regards,
Mukul



__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread
  • RE: entity output, (continued)
    • Craig Kattner - Thu, 12 Jun 2003 15:30:13 -0400 (EDT)
    • Craig Kattner - Thu, 12 Jun 2003 15:37:23 -0400 (EDT)
    • Passin, Tom - Thu, 12 Jun 2003 16:18:34 -0400 (EDT)
      • Mukul - Thu, 12 Jun 2003 22:02:12 -0400 (EDT) <=
        • Jason - Fri, 13 Jun 2003 01:58:03 -0400 (EDT)
        • Mukul - Fri, 13 Jun 2003 23:47:20 -0400 (EDT)
        • Mukul - Sat, 14 Jun 2003 02:42:11 -0400 (EDT)

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.