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

Re: design question on function namespaces

Subject: Re: design question on function namespaces
From: Bruce D'Arcus <bdarcus@xxxxxxxxx>
Date: Tue, 3 May 2005 09:15:08 -0400
swaby design
On May 3, 2005, at 8:58 AM, Michael Kay wrote:

The thinking here is that it's often useful to create a library of reusable
functions that compute derived data from your source document: for example,
"does this chapter have any footnotes" or "how many columns are there in
this table" or "is this employee in the pension scheme" or "get all the
products that this customer has bought". You should think of these as
methods associated with the element in question (even though there's no
encapsulation or inheritance), and recognize the link between code and data
by matching up the namespace.

Yes, I understand this. But say you want to implement a function for your "does this chapter have any footnotes" example, but you deal with DocBook NG, TEI 5 and OpenOffice. Would you reimplement the function three times, or would there be a way to make it generic so that it could be reused across the different document types and namespaces. If you do the former, then they're not THAT reusable.


My thinking here is partly conditioned by learning more about the SRU and SRW search and retrieve protocols, and their CQL query language, all of which come out of the library world. There you have abstract queries defined in indices. So, if you query the Library of Congress SRU (RESTful) server, you don't do "mods:titleInfo/mods:title="whatever"; you do "title=whatever" and let the server determine what to do with that.

Example:

http://z3950.loc.gov:7090/Voyager?
operation=searchRetrieve&version=1.1&query=dc.title=XSLT&recordSchema=mo
ds&startRecord=1&maximumRecords=20

I know XSLT presents limitations to implement this sort of thing, but I guess I'm thinking about the possibility of a similar sort of abstract functions -- like "bib:getYearIssued" -- that could be extended to take different input sources.

Bruce

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.