You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Colin Paul Adams <co...@colina.demon.co.uk> on 2002/10/23 16:14:34 UTC

DTD v. WXS v. Schematron v. RelaxNG

I have just finished further revisions to the draft sitemap. I shall
upload the new version to bugzilla as you read this.

>From the current todo.xml:

[code] For 2.1: Fine-tune the draft Sitemap DTD -
src/webapp/WEB-INF/entities/sitemap-v03.dtd  (see internal
comments). Tweak the default sitemaps to ensure that they
validate. Fine-tune the draft Sitemap WXS too -
src/documentation/xdocs/drafts/sitemap-2.1-draft.xsd  (see internal
comments). Anyone for Relax NG? 

This seems all a bit contradictory to me. Why do we need more than one
type of schema file? Can't we decide which format we want to use? I
would vote for anything other than DTD (as it is impossible to
validate all possible sitemaps with a DTD - my new version validates
all existing sitemaps in the distribution, but will need changing if
new tags are used).

I am somewhat puzzled by the use of namespaces in the sitemap. Both
the sitemap namespace and the global namespace are used, and I cannot
see why this should be (for instance, both parameter and redirect-to
occur in both namespaces). Looking at the java code, I cannot see that
the namespace is checked at all. In which case, why not just declare a
default namespace on the sitemap element?

Anyway, I'm hope to carry on with this work, if I knew what direction
it was supposed to go. 
-- 
Colin Paul Adams
Preston Lancashire

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


Re: DTD v. WXS v. Schematron v. RelaxNG

Posted by David Crossley <cr...@indexgeo.com.au>.
David Crossley wrote:
> Colin Paul Adams wrote:
<snip/>
> > Can't we decide which format we want to use?
> > I would vote for anything other than DTD (as it is
> > impossible to
> > validate all possible sitemaps with a DTD - ...
> 
> Yes, as we discussed a few days ago, this decision
> is the next step. To help decide which technology, we
> also need to consider how and when it will be used.
> I presume that we are only talking about build-time
> for now (on sitemap change time is a future issue).
> 
> Something that applies a schema via external reference
> is probably key. 
> 
> I have experimented further with Relax NG today.
> The sitemap-v04.dtd converted into RNG okay when using
> DTDinst. There is a supplied Ant task for Jing which
> i am currently trying to get happening with Cocoon
> build.xml (having trouble finding the JingTask class).
> http://www.thaiopensource.com/relaxng/
> As Jeff said in another thread, JARV is probably the
> framework that is needed. Jing can work with that.

This works beautifully. If anyone else wants to try it,
then i have added an "enhancement" patch to Bugzilla
showing the few steps and providing a patch to build.xml
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13925
wo
--David



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


Re: DTD v. WXS v. Schematron v. RelaxNG

Posted by Peter Royal <pr...@apache.org>.
On Thursday, October 24, 2002, at 09:57  PM, David Crossley wrote:
> Excellent news, Pete. This will be a big advantage.
> When you say "JARV API" do you mean the
> http://iso-relax.sourceforge.net/JARV/

Yes.

> I see that their User's Guide says ...
>  <quote>
>  Although it originally came from the RELAX community,
>  JARV is not limited to RELAX; it can be used with many
>  other schema languages.
>  </quote>
> ... and they specifically mention examples
> Jing for Relax NG
> Xerces-2 for W3C XML Schema (WXS).

I have only dealt with Jing (since the RELAX-NG specs were much easier 
and quicker to read :) ... but the code is agnostic.
-pete
-- 
peter royal -> proyal@apache.org


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


Re: DTD v. WXS v. Schematron v. RelaxNG

Posted by David Crossley <cr...@indexgeo.com.au>.
Peter Royal wrote:
> David Crossley wrote:
> > We trust that the current spurt of activity will
> > provide sufficient momentum and go to the next stage
> > - actually doing validation of important configuration
> > files: sitemap.xmap, cocoon.xconf, and also xdocs.
> 
> There are already bits in Avalon CVS that will handle validation of a 
> Configuration object. The current implementation uses the JARV API with 
> Jing underneath it (for RELAX-NG validation. Sun has a JARV impl that 
> does XML Schema too I believe but I'm unsure as to the freeness of it).
> 
> I have on my todo-list to break that code out and make it part of the 
> excalibur/configuration, I'll step that up and try to get it done this 
> weekend so it can be plugged into Cocoon.
> -pete

Excellent news, Pete. This will be a big advantage.
When you say "JARV API" do you mean the
http://iso-relax.sourceforge.net/JARV/

I see that their User's Guide says ...
 <quote>
 Although it originally came from the RELAX community,
 JARV is not limited to RELAX; it can be used with many
 other schema languages.
 </quote>
... and they specifically mention examples
Jing for Relax NG
Xerces-2 for W3C XML Schema (WXS).

--David




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


Re: DTD v. WXS v. Schematron v. RelaxNG

Posted by Peter Royal <pr...@apache.org>.
On Thursday, October 24, 2002, at 03:01  AM, David Crossley wrote:
> We trust that the current spurt of activity will
> provide sufficient momentum and go to the next stage
> - actually doing validation of important configuration
> files: sitemap.xmap, cocoon.xconf, and also xdocs.

There are already bits in Avalon CVS that will handle validation of a 
Configuration object. The current implementation uses the JARV API with 
Jing underneath it (for RELAX-NG validation. Sun has a JARV impl that 
does XML Schema too I believe but I'm unsure as to the freeness of it).

I have on my todo-list to break that code out and make it part of the 
excalibur/configuration, I'll step that up and try to get it done this 
weekend so it can be plugged into Cocoon.
-pete

-- 
peter royal -> proyal@apache.org


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


Re: DTD v. WXS v. Schematron v. RelaxNG

Posted by David Crossley <cr...@indexgeo.com.au>.
Colin Paul Adams wrote:
> I have just finished further revisions to the draft sitemap. I shall
> upload the new version to bugzilla as you read this.
> 
> From the current todo.xml:
> 
> [code] For 2.1: Fine-tune the draft Sitemap DTD -
> src/webapp/WEB-INF/entities/sitemap-v03.dtd  (see internal
> comments). Tweak the default sitemaps to ensure that they
> validate. Fine-tune the draft Sitemap WXS too -
> src/documentation/xdocs/drafts/sitemap-2.1-draft.xsd  (see internal
> comments). Anyone for Relax NG? 
> 
> This seems all a bit contradictory to me. Why do we need more than one
> type of schema file?

They are both "draft", so the "todo" entry is to draw
attention to them and keep them maintained, until we
decide on something better. Unfortunately, both
schemata have been languishing for a long time.

We trust that the current spurt of activity will
provide sufficient momentum and go to the next stage
- actually doing validation of important configuration
files: sitemap.xmap, cocoon.xconf, and also xdocs.

> Can't we decide which format we want to use?
> I would vote for anything other than DTD (as it is
> impossible to
> validate all possible sitemaps with a DTD - ...

Yes, as we discussed a few days ago, this decision
is the next step. To help decide which technology, we
also need to consider how and when it will be used.
I presume that we are only talking about build-time
for now (on sitemap change time is a future issue).

Something that applies a schema via external reference
is probably key. 

I have experimented further with Relax NG today.
The sitemap-v04.dtd converted into RNG okay when using
DTDinst. There is a supplied Ant task for Jing which
i am currently trying to get happening with Cocoon
build.xml (having trouble finding the JingTask class).
http://www.thaiopensource.com/relaxng/
As Jeff said in another thread, JARV is probably the
framework that is needed. Jing can work with that.

> my new version validates
> all existing sitemaps in the distribution, but will
> need changing if new tags are used).

This has been the fundamental problem. The old sitemap
DTD (sitemap-v02.dtd) validated all existing sitemaps
in the distribution at that time. Subsequently, changes
were made to the Java sitemap code but not reflected
in the DTD.

This is a symptom of something that really worries me.
It seems that there is not enough focus in Cocoon on
the powers of XML. If we ensured valid XML instances
then Java code could rely on that, and so be much more
simple.

As you said in another thread - let us get some basic
validation system in place as soon as possible. This
ensures that DTD (and sitemaps) are properly maintained.
Then we can grow up to use something better.

> I am somewhat puzzled by the use of namespaces in the sitemap. Both
> the sitemap namespace and the global namespace are used, and I cannot
> see why this should be (for instance, both parameter and redirect-to
> occur in both namespaces). Looking at the java code, I cannot see that
> the namespace is checked at all. In which case, why not just declare a
> default namespace on the sitemap element?

Please raise this issue in an email thread with its
own "Subject". Threads with multiple topics just get
lost in the massive volume.

> Anyway, I'm hope to carry on with this work, if I knew what direction
> it was supposed to go. 

Great, this is vitally important stuff.
--David




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