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

Consolidating stylesheet functionality

Subject: Consolidating stylesheet functionality
From: Tim Lebo <timleboxslt@xxxxxxxxx>
Date: Mon, 23 Jan 2006 20:55:13 -0500
xml consolidating
I am using Kay's Modified Identity Transform Pattern to add an
attribute (@number) to certain elements (object | link). The attribute
values are unique values. The input and output are show below.

Is it possible to "capture" the result of this ID-assignment
processing and continue to manipulate the temporary tree after the new
attributes have been added, thus allowing all processing to be
captured in a single stylesheet? This seems to touch on the
functionality of xsl:function and/or xsl:import. Any references to
sections of Kay's XSLT 2.0 ed 3 would be appreciated (I'm only on page
70 of a complete read-through).

Currently, I have two xsl sheets:
java -jar saxon8.jar input.xml modifiedIdentityTransform.xsl >
input-numbered.xml
java -jar saxon8.jar input-numbered.xml myadditionalProcessing.xsl >
finally-done.xml

I would like a single xsl that consolidates the functionality of both
xsls. myAdditionalProcessing.xsl could be anything that relies on the
@number attribute on the object and link elements.

Regards,
Tim Lebo

the input and output:

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <object id="a">
    <attribute name="color" value="red"/>
  </object>
  <object id="b">
     <attribute name="size" value="big"/>
  </object>
  <object id="c">
     <attribute name="size" value="small"/>
     <attribute name="color" value="purple"/>
  </object>
  <link fromobject="c" toobject="b"/>
</root>

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <object id="a" number="1">
      <attribute name="color" value="red"/>
  </object>
  <object id="b" number="2">
     <attribute name="size" value="big"/>
  </object>
  <object id="c" number="3">
     <attribute name="size" value="small"/>
     <attribute name="color" value="purple"/>
  </object>
  <link fromobject="c" toobject="b" number="4"/>
</root>[

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.