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

RE: XSLT: Transforming one markup to another markup

Subject: RE: XSLT: Transforming one markup to another markup
From: "Tedla, Sridhar \(LNG-CSP\)" <Sridhar.Tedla@xxxxxxxxxxxxxx>
Date: Tue, 2 May 2006 01:31:02 -0600
tedla
Sorry for the confusion.
I will try to explain my question with more information and initially I
will answer Kamal's question:

The X markup does not exactly matches with markup Y.
Always last hierlev will have additional two hierlevs which needs to be
hardcoded i.e. requirement. For example:
Under Hierlev element(i.e. the heading->title's value is
"Manufacturing") two hierlev elements needs to be added(i.e. one
hierlev->heading->Title's value is "Infobase Title" and other one is
hierlev->heading->Title's value is "Title Value").

The mapping between X markup elements and Y Markup elements:

class  -     hier
The scheme has no value i.e. the element can be ignored in XSLT Code
Classitem - heirlev
identifier -heading
name       - title
code has no mapping i.e. the element can be ignored in XSLT Code

role attribute has no mapping in the input document.
The role attribute values are passed as parameters to the XSLT code but
we will assume as they hardcoded(i.e. all of the hierlev element's
attribute role value is "ancestor" except last one(i.e. the last one
role value is "me").

The example markup's depth is as follows:
Class element is depth of 3
Hierlev element is depth 5(i.e. matches with the input and two
additional ones)
The depth can vary i.e. the class element depth can be any number i.e.
arbitary number.

The X Markup is as follows:
<class classscheme="SAT">
   <classitem>
	 <identifier>
		<name>Sales </name>
           	<code>1234</code>
	 </identifier>
	 <classitem>
 	   <identifier>
		  <name> Tax</name>
		  <code>5678</code>
	   </identifier>
	 <classitem>
	   <identifier>
		 <name>Items  </name>
		 <code>9101</code>
	   </identifier>
	  <classitem>
	     <identifier>
		<name>Manufacturing </name>
		<code>1121</code>
	     </identifier>
           </classitem>
	</classitem>
     </classitem>
    </classitem>
</class>




The Y Markup is has follows:

<hier>
  <hierlev role="ancestor">
     <heading>
	<title>Sales</title>
     </heading>

     <hierlev role="ancestor">
        <heading>
	   <title> Tax</title>
         </heading>

         <hierlev role="ancestor">
	<heading>
              <title>Items </title>
	</heading>
            <hierlev role="ancestor">
	       <heading>
		  <title>Manufacturing </title>
	       </heading>
                  <hierlev role="ancestor">
		   <heading>
			<title>Revised Code </title>
		    </heading>
	        </hierlev>
	        <hierlev role="me">
    		    <heading>
			<title> Title Value</title>
		     </heading>
	         </hierlev>
	    </hierlev>
          </hierlev>
     </hierlev>
   </hierlev>
</hier>

Still not sure what the question is (I am assuming that you are not
asking someone here to write the XSLT for you). If you are asking if
this is possible, the answer is most probably. I am a bit uncertain what
you mean by

In Y Markup--- always the last hierlev element contains two  hierlev as
children.

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.