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

Urgent..please advise

Subject: Urgent..please advise
From: Charles Fong <cfong@xxxxxxxxxxxxx>
Date: Mon, 26 Jul 1999 01:00:08 -0700
charles fong
Hi, experts,
      I am trying to do some XSLT stuffs and have such problem to solve.

This is a part of the source xml file.

  <CNTROLAREA>
  <SENDER>
  <LOGICALID>XX141HG09</LOGICALID>
  <COMPONENT>PUR</COMPONENT>
  <TASK>MAINT</TASK>
  <REFERENCEID>95129945823449</REFERENCEID>
  <CONFIRMATION>1</CONFIRMATION>
  <LANGUAGE>EN</LANGUAGE>
  <CODEPAGE>test</CODEPAGE>
  <AUTHID>CMKURT</AUTHID>
  </SENDER>
  <DATETIME qualifier="CREATION">
  <YEAR>1998</YEAR>
  <MONTH>11</MONTH>
  <DAY>21</DAY>
  <HOUR>17</HOUR>
  <MINUTE>11</MINUTE>
  <SECOND>45</SECOND>
  <SUBSECOND>0000</SUBSECOND>
  <TIMEZONE>-0600</TIMEZONE>
  </DATETIME>
  </CNTROLAREA>

I am still trying to figure out a xsl file  which can  produce the following
resulting  xml:

<CNTROLAREA>
  <SENDER>
  <LOGICALID>XX141HG09</LOGICALID>
  <COMPONENT>PUR</COMPONENT>
  <TASK>MAINT</TASK>
  <REFERENCEID>95129945823449</REFERENCEID>
  <CONFIRMATION>1</CONFIRMATION>
  <LANGUAGE>EN</LANGUAGE>
  <CODEPAGE>test</CODEPAGE>
  <AUTHID>CMKURT</AUTHID>
  </SENDER>
  <CREATION_DATE>1998/11/21 17:11:45</CREATION_DATE>
 </CNTROLAREA>

Basically, I want to try to identify the DATETIME structure in the source
xml file and collapse the structure to a simple data structure depending on
the "qualifier" value of the DATETIME as shown above. All the other xml
is untouched and need to appear in the resulting xml. Also this DATETIME structure
can appear at any level of the tree in the source xml (above only a simple example).

So my questions is : How can I achieve this in XSLT? i.e.  extracting the
DATETIME structure at whatever level from the source xml and collapsing it
as shown above with all other xml untouched in the source.  If this can be done,
could you kindly provide me the xsl command to do it? Thanks a lot in advance.

charles
 
 

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.