cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hunsberger, Peter" <>
Subject RE: Pattern wildcards meaning
Date Mon, 02 Sep 2002 13:34:19 GMT
> Samples provided with Cocoon dist. use path-like style to parameterize 
> patterns, e.g.
> <map:match pattern="*/*">
> where, for instance, in sitemap administrator mind, 1st * is meaning
> #1" and 2nd * "source #2" (these wildcards beeing use to aggregate two 
> sources).
> Why not use a more verbose pattern like:
> <map:match pattern="aggregate[source1=*][source2=*]">
> using an XPath predicate-like style?
> This way, you don't need to comment the pattern and everybody can
> understand it.

Having not looked at the source URL this, off hand, strikes me as a bad
idea; it exposes the (presumed) implementation of the URL to those calling
it.  What happens if the implementation changes from using an aggregation to
using a named source and a named stylesheet?  Does everyone have to go back
and change all the calling URLs (or do you just live with URLs that have
nothing to do with reality)?  

IMO, abstraction is a good idea when building web links.  A specific
implementation should be commented so those who need to know can understand
how the implementation works, but everyday users should have such details
hidden from them.  I suspect, in this case, some of my comments may not
apply, the calling URL may specifically name the source files as XML, but
even then, I wouldn't necessarily want to expose any more about the
implementation than I have to.

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message