You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Giacomo Pati <pa...@yahoo.com> on 2000/06/15 16:03:18 UTC

[C2] sitemap namespaces

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=...)?

TIA

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

__________________________________________________
Do You Yahoo!?
Yahoo! Photos -- now, 100 FREE prints!
http://photos.yahoo.com

Re: [C2] sitemap namespaces

Posted by Giacomo Pati <Gi...@pwr.ch>.

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

RE: [C2] sitemap namespaces

Posted by David Duddleston <da...@i2a.com>.
>  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#*"

I like this one the most.

-david 

Re: [C2] sitemap namespaces

Posted by Stefano Mazzocchi <st...@apache.org>.
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.

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

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------