You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Stephen Winnall <st...@winnall.ch> on 2007/06/06 13:47:41 UTC

re-design of sitemaps

Has anyone given any thought to a re-design of Cocoon's sitemaps in  
one of the new versions of Cocoon? I can see scope for improvement in  
the following areas:

1) modularisation
2) re-use of definitions (e.g. action sets, resources)
3) definition of a sitemap schema
4) requirement that sitemaps validate against that schema (would make  
it easier to write sitemap tools)

These are just things that have bitten me. I'm sure other people   
will be able to add to this list.

I realise that this strikes at the very heart of Cocoon and would  
mean a lot of work. But it seems to me such an obvious place for  
improvement that I wondered if anything was planned.

Steve


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: re-design of sitemaps

Posted by Peter Flynn <pf...@ucc.ie>.
Stephen Winnall wrote:
>> validation is off by default but can be activated, again only in 
>> Cocoon 2.2
> 
> Correct me if I am wrong, but I thought that it was impossible to write 
> a complete XML schema for the current version of the sitemap. I thought 
> all attempts hitherto were only approximations. One of the major 
> problems is that any extensions a user writes (actions, transformations, 
> etc.) might introduce new elements and attributes into the sitemap which 
> the schema cannot know about a priori. I was looking for a solution 
> where any valid sitemap could be validated against the schema, which 
> seems to me to imply a change in the structure of sitemaps.

This is perhaps one of those occasions when a modular DTD might make 
more sense than a Schema, because local changes can be implemented and 
tested in the internal subset without the need to coordinate global 
changes to the distribution. What you lose in data content validation is 
probably compensated for in additional flexibility.

///Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: re-design of sitemaps

Posted by Reinhard Poetz <re...@apache.org>.
Geert Josten wrote:
>> Would it be right to say that the intention of this XML 
>> schema is only to support a simple subset of all possible 
>> current Cocoon sitemaps? Can one then provide the missing 
>> functionality by writing one's own blocks using the 
>> servlet-service framework?
> 
> Have you tried validating your own sitemaps to this XSD yet? It contains
> constructs that allow entry of unknown elements..

exactly

-- 
Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                        web(log): http://www.poetz.cc
--------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: re-design of sitemaps

Posted by Grzegorz Kossakowski <gk...@apache.org>.
Christian Schlichtherle pisze:
> Hi,
> 
> many folks seem confused about XML Schema. If so, they may be confused about
> DTD or Relax NG as well. All of these are just definitions of a grammar, not
> semantics. So if a sitemap has been validated with a schema, this means no
> more than that the sitemap is well-formed XML which complies to the specific
> grammar in the schema. Just like a traditional parser.

Christian, you are of course right but the strictest schema we have the less errors you are going to tackle at a runtime.

> Anyway, the big benefit of a complete schema for the sitemap to me is code
> completion. Now that I have an XML Schema, I can tell my IDE (NetBeans) to
> aid me with code completion when editing sitemaps.

Yes, that's the main benefit of having good schema.
For all the folks reading this thread: if you see that current schema is not perfect just improve it, send us a path on JIRA and I'm sure 
that someone will be really happy to submit valuable improvements.

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: re-design of sitemaps

Posted by Christian Schlichtherle <ch...@schlichtherle.de>.
Hi,

many folks seem confused about XML Schema. If so, they may be confused about
DTD or Relax NG as well. All of these are just definitions of a grammar, not
semantics. So if a sitemap has been validated with a schema, this means no
more than that the sitemap is well-formed XML which complies to the specific
grammar in the schema. Just like a traditional parser.

Anyway, the big benefit of a complete schema for the sitemap to me is code
completion. Now that I have an XML Schema, I can tell my IDE (NetBeans) to
aid me with code completion when editing sitemaps.

Kind regards,
Christian


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: re-design of sitemaps

Posted by Carsten Ziegeler <cz...@apache.org>.
Stephen Winnall wrote:
> 
> On 6 Jun 2007, at 18:49, Geert Josten wrote:
> 
>>>>> 3) definition of a sitemap schema
>>>>
>>>> http://cocoon.apache.org/schema/sitemap/cocoon-sitemap-1.0.xsd
>>> rvlet-service framework?
>>
>> Have you tried validating your own sitemaps to this XSD yet? It contains
>> constructs that allow entry of unknown elements..
> 
> I tried a couple of sitemaps before I posted the original comment. One 
> of them was based on the sitemap delivered with Cocoon 2.1.9. Both threw 
> up errors (mainly unknown attributes).
> 
> I am aware that schemas can be written using the <any> element for 
> undefined or unknown content, but that seems a bit of a cop-out to me. I 
> don't know what the official adjective is for the class of XML documents 
> for which a complete and correct XML schema can be written: let's use 
> "x-able" as a place-holder. To the best of my knowledge, the Cocoon 
> sitemap is not x-able, and I think that inhibits the development of 
> useful tools for making Cocoon easier to use. (Perhaps the SunBow or 
> Lepido people could comment on that?)
> 
The current schema is a first version which has been tested against all 
sitemaps of Cocoon 2.2.
And they validate against it :) But of course this doesn't guarantee 
that it's perfect.

Now, a schema can only validate the structure (more or less at least), 
so it can't detect any logical errors one might have in the sitemap like
a missing generator or something like that.

Custom tags are actually only allowed for component configuration. We 
could also ignore all elements in other namespaces that might occur 
throughout the sitemap, but I'm not sure if this is a good idea. I would 
like to have the schema as strict as possible.

If you have a sitemap which does not validate against the schema, it 
would be great if you could file a bug, so we can enhance the schema.

One could think of additional validation tools on top of the schema 
which try to analyze the logic of the sitemap.

Carsten


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: re-design of sitemaps

Posted by Stephen Winnall <st...@winnall.ch>.
On 6 Jun 2007, at 18:49, Geert Josten wrote:

>>>> 3) definition of a sitemap schema
>>>
>>> http://cocoon.apache.org/schema/sitemap/cocoon-sitemap-1.0.xsd
>> rvlet-service framework?
>
> Have you tried validating your own sitemaps to this XSD yet? It  
> contains
> constructs that allow entry of unknown elements..

I tried a couple of sitemaps before I posted the original comment.  
One of them was based on the sitemap delivered with Cocoon 2.1.9.  
Both threw up errors (mainly unknown attributes).

I am aware that schemas can be written using the <any> element for  
undefined or unknown content, but that seems a bit of a cop-out to  
me. I don't know what the official adjective is for the class of XML  
documents for which a complete and correct XML schema can be written:  
let's use "x-able" as a place-holder. To the best of my knowledge,  
the Cocoon sitemap is not x-able, and I think that inhibits the  
development of useful tools for making Cocoon easier to use. (Perhaps  
the SunBow or Lepido people could comment on that?)

Steve


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: re-design of sitemaps

Posted by Geert Josten <ge...@daidalos.nl>.
> >> 3) definition of a sitemap schema
> >
> > http://cocoon.apache.org/schema/sitemap/cocoon-sitemap-1.0.xsd
> >
> >> 4) requirement that sitemaps validate against that schema 
> (would make 
> >> it easier to write sitemap tools)
> >
> > validation is off by default but can be activated, again only in 
> > Cocoon 2.2
> 
> Correct me if I am wrong, but I thought that it was 
> impossible to write a complete XML schema for the current 
> version of the sitemap. I thought all attempts hitherto were 
> only approximations. One of the major problems is that any 
> extensions a user writes (actions, transformations, etc.) 
> might introduce new elements and attributes into the sitemap 
> which the schema cannot know about a priori. I was looking 
> for a solution where any valid sitemap could be validated 
> against the schema, which seems to me to imply a change in 
> the structure of sitemaps.
> 
> Would it be right to say that the intention of this XML 
> schema is only to support a simple subset of all possible 
> current Cocoon sitemaps? Can one then provide the missing 
> functionality by writing one's own blocks using the 
> servlet-service framework?

Have you tried validating your own sitemaps to this XSD yet? It contains
constructs that allow entry of unknown elements..

Kind regards,
Geert
   
 
Drs. G.P.H. Josten
Consultant
 
 

Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
KvK 27164984


De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: re-design of sitemaps

Posted by Stephen Winnall <st...@winnall.ch>.
Thanks for the reply:

On 6 Jun 2007, at 14:10, Reinhard Poetz wrote:

> Stephen Winnall wrote:
>> Has anyone given any thought to a re-design of Cocoon's sitemaps  
>> in one of the new versions of Cocoon? I can see scope for  
>> improvement in the following areas:
>> 1) modularisation
>
> Cocoon 2.2 uses the servlet-service framework. See http:// 
> cocoon.zones.apache.org/daisy/cdocs/g2/g2/g1/1291.html

That looks interesting, in particular the use of Maven. I find no  
mention of OSGI in this context, however. Is this no longer a course  
being pursued in the Cocoon project?

>> 3) definition of a sitemap schema
>
> http://cocoon.apache.org/schema/sitemap/cocoon-sitemap-1.0.xsd
>
>> 4) requirement that sitemaps validate against that schema (would  
>> make it easier to write sitemap tools)
>
> validation is off by default but can be activated, again only in  
> Cocoon 2.2

Correct me if I am wrong, but I thought that it was impossible to  
write a complete XML schema for the current version of the sitemap. I  
thought all attempts hitherto were only approximations. One of the  
major problems is that any extensions a user writes (actions,  
transformations, etc.) might introduce new elements and attributes  
into the sitemap which the schema cannot know about a priori. I was  
looking for a solution where any valid sitemap could be validated  
against the schema, which seems to me to imply a change in the  
structure of sitemaps.

Would it be right to say that the intention of this XML schema is  
only to support a simple subset of all possible current Cocoon  
sitemaps? Can one then provide the missing functionality by writing  
one's own blocks using the servlet-service framework?

Steve

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: re-design of sitemaps

Posted by Stephen Winnall <st...@winnall.ch>.
On 8 Jun 2007, at 12:22, Antonio Gallardo wrote:

> A lot of people asked to have an schema of the sitemap,  
> unfortunately nobody cared to update it. If you provide it, I am  
> willing commit it. :)

If I thought it were possible without changing the current syntax of  
the sitemap, I might try it. The current schema seems to support a  
best-effort subset: if the things it doesn't support can be  
deprecated and replaced by the new service/block mechanism, a  
complete schema might become possible. Perhaps when Cocoon 3 arises  
on the horizon we could start by re-doing the sitemap :)

Steve


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: re-design of sitemaps

Posted by Antonio Gallardo <ag...@agssa.net>.
Stephen Winnall escribió:
> I understand that sentiment, but it would make sitemaps easier for me 
> if I could validate them in my XML editor. And I suspect that we might 
> have more user-friendly tools for Cocoon to make it easier to grok, if 
> the sitemap could be easily marshalled and unmarshalled (i.e. were 
> based on a schema).
A lot of people asked to have an schema of the sitemap, unfortunately 
nobody cared to update it. If you provide it, I am willing commit it. :)

Best Regards,

Antonio Gallardo.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: re-design of sitemaps

Posted by Stephen Winnall <st...@winnall.ch>.
On 6 Jun 2007, at 17:27, J.D. Williams wrote:

> On Wed, 2007-06-06 at 14:10 +0200, Reinhard Poetz wrote:
>> Stephen Winnall wrote:
>>> Has anyone given any thought to a re-design of Cocoon's sitemaps  
>>> in one
>>> of the new versions of Cocoon? I can see scope for improvement in  
>>> the
>>> following areas...
>
> Cocoon is tough enough to grok now without changing things that  
> function
> well enough.
>
> Making changes to modularize blocks simplifies things. The changes you
> suggest offer no improvement from a user perspective (at least, not  
> for
> THIS user).
>
> The main improvement Cocoon needs is better documentation, not yet
> another poorly documented change that users will have to struggle  
> with.

I understand that sentiment, but it would make sitemaps easier for me  
if I could validate them in my XML editor. And I suspect that we  
might have more user-friendly tools for Cocoon to make it easier to  
grok, if the sitemap could be easily marshalled and unmarshalled  
(i.e. were based on a schema).

Steve



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: re-design of sitemaps

Posted by "J.D. Williams" <jd...@austin.rr.com>.
On Wed, 2007-06-06 at 14:10 +0200, Reinhard Poetz wrote:
> Stephen Winnall wrote:
> > Has anyone given any thought to a re-design of Cocoon's sitemaps in one 
> > of the new versions of Cocoon? I can see scope for improvement in the 
> > following areas...

Cocoon is tough enough to grok now without changing things that function
well enough.

Making changes to modularize blocks simplifies things. The changes you
suggest offer no improvement from a user perspective (at least, not for
THIS user).

The main improvement Cocoon needs is better documentation, not yet
another poorly documented change that users will have to struggle with.

Yes, the sitemap is (as it says in the comments and the documentation)
the heart of Cocoon. Leave it alone.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: re-design of sitemaps

Posted by Reinhard Poetz <re...@apache.org>.
Stephen Winnall wrote:
> Has anyone given any thought to a re-design of Cocoon's sitemaps in one 
> of the new versions of Cocoon? I can see scope for improvement in the 
> following areas:
> 
> 1) modularisation

Cocoon 2.2 uses the servlet-service framework. See 
http://cocoon.zones.apache.org/daisy/cdocs/g2/g2/g1/1291.html

> 2) re-use of definitions (e.g. action sets, resources)

also see http://cocoon.zones.apache.org/daisy/cdocs/g2/g2/g1/1291.html. there is 
an example of a servlet-service transformer.

> 3) definition of a sitemap schema

http://cocoon.apache.org/schema/sitemap/cocoon-sitemap-1.0.xsd

> 4) requirement that sitemaps validate against that schema (would make it 
> easier to write sitemap tools)

validation is off by default but can be activated, again only in Cocoon 2.2

> 
> These are just things that have bitten me. I'm sure other people  will 
> be able to add to this list.
> 
> I realise that this strikes at the very heart of Cocoon and would mean a 
> lot of work. But it seems to me such an obvious place for improvement 
> that I wondered if anything was planned.

Thanks for your feedback!

-- 
Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                        web(log): http://www.poetz.cc
--------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org