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

[ ? ] Ignoring redundancy

Subject: [ ? ] Ignoring redundancy
From: Mikol Graves <mikol@xxxxxxxxxx>
Date: Fri, 13 Oct 2000 12:39:40 -0700
[ ? ] Ignoring redundancy
I am in the process of writing a style-sheet that handles "depends-on"
relationships between XML represented objects. The XML looks something
like:
     
     ...
     <my-variable name="greeting"><body>'Hey there, '</body></my-var>
     <my-variable name="who"><body>'J. User'</body></my-var>

     <my-subroutine name="annoy">
       <require>greeting</require>
       <require>who</require>
       <args>
         <arg name="g"/>
         <arg name="w"/>
       </args>
       <body><![CDATA[
         return (g ? g : greeting) + (w ? w : who) + '!';
       ]]></body>
     </my-subroutine>
     ...

The "depends-on" relationship is handled by an XSLT template like so:

     <xsl:template match="require">
       <xsl:variable name="r" select="."/>
       <xsl:apply-templates 
            select="/*/my-variable[@name=$r] | /*/my-subroutine[@name=$r]"/>
     </xsl:template>

A problem arises when two objects have one or more "depends-on"
relationships in common because the required object(s) will be included
twice. Is there a way to determine when a required object has already
been included?



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


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.