cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <Giacomo.P...@pwr.ch>
Subject Re: [C2] sitemap namespaces
Date Thu, 15 Jun 2000 23:39:58 GMT


Stefano Mazzocchi schrieb:
> 
> Giacomo Pati wrote:
> >
> > Hi all
> >
> > I still have some black spots on my view of the C2 sitemap. Maybe some of you smart
XML peoples
> > can enlight me. Who or what benefits from the separate namespace we introduced for
the loader
> > attributes (src:class=..., src:file=..., src:local=...)?
> 
> It was my idea and maybe is not smart at all...
> 
> The problem is there can be several ways to access a resource, thus the
> need to define different loaders. So far so good.
> 
> There are two ways to indicate this:
> 
>  - URI-encoding
>  - XML-encoding
> 
> Let's consider URI encoding:
> 
>  class:org.apache.whatever.Component
>  file:/home/mystuff/java/MyDirGenerator.class
>  local:./classes/IPValidityMatcher.class
>  jar:./apps/faq-o-matic.cocoon#*
> 
> where ":" is the separator. This doesn't work for windows. So
> 
>  class://org.apache.whatever.Component
>  file://home/mystuff/java/MyDirGenerator.class
>  local://./classes/IPValidityMatcher.class
>  jar://./apps/faq-o-matic.cocoon#*
> 
> but "//./classes" might be very confusing. We can do
> 
>  class|org.apache.whatever.Component
>  file|/home/mystuff/java/MyDirGenerator.class
>  local|./classes/IPValidityMatcher.class
>  jar|./apps/faq-o-matic.cocoon#*
> 
> which works on every platform (for what I know) and cannot be confused
> with files (being "|" invalid in filenames in most platforms).
> 
> Anyway, we have to "encode" semantic information, but, guess what?, we
> are creating an XML schema, let's use it!
> 
> Possible XML encodings are
> 
>  src-class="org.apache.whatever.Component"
>  src-file="/home/mystuff/java/MyDirGenerator.class"
>  src-local="./classes/IPValidityMatcher.class"
>  src-jar="./apps/faq-o-matic.cocoon#*"
> 
> which require a change in the sitemap schema for the addition of a new
> loader or
> 
>  src:class="org.apache.whatever.Component"
>  src:file="/home/mystuff/java/MyDirGenerator.class"
>  src:local="./classes/IPValidityMatcher.class"
>  src:jar="./apps/faq-o-matic.cocoon#*"
> 
> which restrict the schema change at the "loading" namespace, thus
> creating a multidimensional space for the sitemap where resource
> indication and their loading are "orthogonal" (and this is the right
> term now).
> 
> I believe this latest solution is the best and more future compatible,
> even if requires a little more XML understandings to grasp its design
> implications.

Yes, I had thought it has to do with XML Schema because I've begun to
write one for the so far proposed sitemap (and it was the only benefit I
had seen so far).
And as I understand it now it has only a logical benefit. You don't gain
any simpler coding or alike.

> Anyway, maybe I overlooked even simpler ways to do this... any comment
> is welcome, as always.

Thank you for your explanations. I do appreciate that much.

Giacomo

-- 
PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1 856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1 856 2201
Hintereichenstrasse 7                     Mailto:Giacomo.Pati@pwr.ch
CH-8166 Niederweningen                    Web:   http://www.pwr.ch

Mime
View raw message