freelanceprogrammers.org Forum Index » XML / XSL
extending XHTML
Joined: 14 Sep 2005
Posts: 4
extending XHTML
Hi,
I`m working with James Clark`s Modularization of XHTML in Relax NG, in
hopes of being able to extend it for a project I`m working on. I`m
working with Trang (in Oxygen 6.2 Mac), as I need the final schema
format to be .xsd for use in a .NET environment.
So as a test, I validated a simple XHTML document against the Relax NG
schema. It validates no problem. So far so good.
I then convert the relax ng schema to a W3C XML schema (again using
Trang in Oxygen), and use the resulting .xsd schema to validate the
same XHTML document. This time I get a bunch of errors, for example:
Location: 7:34
Description: E cos-nonambig: "http://www.w3.org/1999/xhtml":del and
"http://www.w3.org/1999/xhtml":del (or elements from their substitution
group) violate "Unique Particle Attribution". During validation against
this schema, ambiguity would be created for those two particles.
URL: http://www.w3.org/TR/xmlschema-1/#cos-nonambig
Ok so Trang isn`t magic... either the relax schema is more comfortable
with this ambiguity, or the highly modular way Mr. Clark wrote the
XHTML rng schema is giving Trang fits. So I directly validate the
xhtml-strict.xsd schema, and I get about 10 errors, and they seem to
be related to the Edit.class.
Now I`m comfortable with DTD`s, and Relax NG just seems the most
elegant way to work with schemas, so I`d like to maintain this XHTML
extension in Relax NG (versus .xsd or dtd).
So I guess I have the following options:
-"fix" the XHTML .rng Edit.class file (if that is the problem) so it
plays nicely with trang and produces a valid (non-ambiguous) .xsd. This
feels to me like pulling on the loose thread in a sweater- soon I`ll be
re-writing the entire thing (!)
- fix the XSD produced by Trang, (and remember to do this anytime I
modify the the relax ng files) this means I`m learning XSD now as
well... : (
- go back to DTD`s
- find a validator that works in .NET that can validate against Relax
NG schemas. I have found two:
http://www.mono-project.com/XML#RELAX_NG
http://sourceforge.net/projects/relaxng
Anyone else had to deal with relax <=> xsd issues for xhtml extensions,
or had experience with these .NET Relax NG validators? I`ve attached
the .rng and xsd versions for edit.class.
TIA,
Chris
:::
Chris Johnson
cs.johnson@...
----------
----------
[Non-text portions of this message have been removed]
Joined: 10 Oct 2005
Posts: 4
extending XHTML
Chris Johnson wrote:
> I`m working with James Clark`s Modularization of XHTML in Relax NG, in
You might be interested in the improved versions of these schemas. There
were some mirror drifts from XHTML specification that were corrected as
part of Relaxed validator project (http://badame.vse.cz/validator/).
http://cvs.sourceforge.net/viewcvs.py/relaxed/relaxed/conf/schema/rng/
Schemas also contain several Schematron rules for precise checking of
several XHTML datatypes like colors and for checking WCAG.
> - find a validator that works in .NET that can validate against Relax
> NG schemas. I have found two:
> http://www.mono-project.com/XML#RELAX_NG
> http://sourceforge.net/projects/relaxng
There is IKVM that can run Java code on the top of .NET runtime. You
should be able to use it for invoking Jing from .NET code.
--
------------------------------------------------------------------
Jirka Kosek e-mail: jirka@... http://www.kosek.cz
------------------------------------------------------------------
Profesionální školení a poradenství v oblasti technologií XML.
Podívejte se na náš nově spuštěný web http://DocBook.cz
Podrobný přehled školení http://xmlguru.cz/skoleni/
------------------------------------------------------------------
Nejbližší termíny školení: DocBook 5.-7.12. * XSL-FO 19.-20.12.
XSLT 17.-20.10. * XML schémata (včetně RELAX NG) 7.-9.11.
------------------------------------------------------------------
[Non-text portions of this message have been removed]
Joined: 10 Oct 2005
Posts: 4
extending XHTML
Dave Pawson wrote:
> The world seems not to be convinced of this Robin.
> I`m having the problem with a group I`m working with, they want XSD
> (because all the other lemmings do) and are not convinced that Relax is any
> more expressive than RNG.
>
> Has anyone collated the difference and made it public?
Probably co-occurences and interleave are features that difference RNG
from WXS the most.
From developer point of view RELAX NG also offers better modularity and
compact syntax.
However I would not suggest RELAX NG for all projects. If data-binding
is your main interest than unambiguity of WXS is good. Otherwise RNG is
better. If I will made it oversimplicated then WXS is for data folks and
RNG for document folks. But you know that boundary between data and
documents is quite fuzzy :-)
Jirka
--
------------------------------------------------------------------
Jirka Kosek e-mail: jirka@... http://www.kosek.cz
------------------------------------------------------------------
Profesionální školení a poradenství v oblasti technologií XML.
Podívejte se na náš nově spuštěný web http://DocBook.cz
Podrobný přehled školení http://xmlguru.cz/skoleni/
------------------------------------------------------------------
Nejbližší termíny školení: DocBook 5.-7.12. * XSL-FO 19.-20.12.
XSLT 17.-20.10. * XML schémata (včetně RELAX NG) 7.-9.11.
------------------------------------------------------------------
[Non-text portions of this message have been removed]
All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
English Courses in England - reservation calendar script
Land Surveying -Stonex instruments and equipments
China Wholesale - Electronics Products
Character Studio - Tutorials and Help
English Courses in England - reservation calendar script
Land Surveying -Stonex instruments and equipments
China Wholesale - Electronics Products
Character Studio - Tutorials and Help







