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

Re: modeling relationships for efficent XSL processing

Subject: Re: modeling relationships for efficent XSL processing
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 26 Feb 2004 11:21:52 -0500
modeling relationships
At 2004-02-26 07:13 -0800, James A. Robinson wrote:
So I've got databases which don't depend on anything, features which
depend on a database type, and sites which depend on features and the
specific database of the type required by the each feature. I find myself
wanting to model things using XPATH notation:

But just how flexible do you need these XPath addresses to be?


<require_db xpath="/dbservers/dbserver/dbname/schema[@name='subscriber_db']"

Could you say:


<require_db schema="subscriber_db"/>

and then within the handling of require_db hardwire the rest of the XPath:

  <xsl:value-of
      select="/dbservers/dbserver/dbname/schema[@name=current()/@schema]"/>

<ref_database xpath="/dbservers/dbserver[@name='oracle1']/dbname[@name='wsj_subscribers']"/>

Could you say:


<ref_database dbserver="oracle1" dbname="wsj_subscribers"/>

and then within the handling of ref_database hardwire the rest of the XPath:

  <xsl:value-of select="/dbservers/dbserver[@name=current()/@dbserver]/
                        /dbname[@name=current()/@dbname]"/>

That way you would have an element type for each of your (I suspect limited set of) possible XPath hardwired addresses where the soft components needed for lookup are supplied as attributes of the element.

But it would only work if you did, indeed, have a limited set of possible XPaths and it was not totally generalizable.

I hope this helps.

........................ Ken


-- US XSL training: Washington,DC March 15; San Francisco,CA March 22 World-wide on-site corporate, government & user group XML training G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc


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.