xsl-list
[Top] [All Lists]

Re: modeling relationships for efficent XSL processing

2004-02-26 10:03:18
Sorry, James, I didn't look closely enough at your original instance to see that my distillation of your XPaths matched your original proposal ... so I guess I miss the nature of your requirement for flexibility.

Why is it that you feel the need to specify the XPaths ... is <require_db> so very flexible that the database schema can be found elsewhere other than where it already exists? Same for <ref_database> ... isn't that kind of information only found where you can expect it to be found?

Sorry for the wasted bandwidth in the earlier message.

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

At 2004-02-26 11:21 -0500, I wrote:
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[(_at_)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[(_at_)name=current()/@schema]"/>

<ref_database xpath="/dbservers/dbserver[(_at_)name='oracle1']/dbname[(_at_)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[(_at_)name=current()/@dbserver]/
                        /dbname[(_at_)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(_at_)CraneSoftwrights(_dot_)com
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



<Prev in Thread] Current Thread [Next in Thread>