You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Peter Shipley <ps...@nomensa.com> on 2004/05/30 19:48:20 UTC
RNG Validation Failure for custom doctype
I can't tell what I have done wrong but I am trying to add a custom
doctype and enable ir be used in the forms editor.
I have created the rng schema/doctype/editor xsl but I think my basic
rng schema is flawed. Any ideas ?
This is my rng which is an adaptation from the lenya ones. I know the
xhtml include is not really necessary but it solves the text tag
dependancy I believe.
<grammar ns="http://www.nomensa.com/2004/news"
xmlns="http://relaxng.org/ns/structure/1.0"
xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:news="http://www.nomensa.com/2004/news"
>
<include href="lenya.rng"/>
<!-- include original XHTML transitional schema -->
<include href="xhtml/xhtml-basic.rng"/>
<define name="news">
<element name="news">
<ref name="lenya.meta"/>
<element name="headline"><text /></element>
<element name="subheading"><text /></element>
<element name="content"><text /></element>
</element>
</define>
</grammar>
My sample xml file is :
<?xml version="1.0" encoding="UTF-8"?>
<news xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"
dcterms:dummy="FIXME:keepNamespace" lenya:dummy="FIXME:keepNamespace"
xmlns="http://www.nomensa.com/2004/news">
<lenya:meta>
<dc:title>dctitle</dc:title>
<dc:creator>Peter Shipley</dc:creator>
<dc:subject>dcsubject</dc:subject>
<dc:description>Abstract that can be used on an overview
page</dc:description>
<dc:publisher/>
<dc:contributor/>
<dc:date>2003-5-21</dc:date>
<dc:type/>
<dc:format/>
<dc:identifier/>
<dc:source/>
<dc:language>en</dc:language>
<dc:relation/>
<dc:coverage/>
<dc:rights>dcrights</dc:rights>
</lenya:meta>
<headline>News Item Created</headline>
<subheading>Brand new news item just created!</subheading>
<content>
Congratualations on inserting your new news item
This should conform to xhtml in this content area
</content>
</news>
I am trying to get a few specific news-related items only and utilise
the lenya meta data to hold the other useful info for a news item such
as created by, date, etc.
Anything obviously wrong with these files ?
The forms editor fails because of RNG validation:
RELAX NG Validation failed:
/usr/local/jakarta-tomcat-5.0.18/webapps/lenya/lenya/pubs/nomensa/work/editor/authoring/news/news1/index_en.xml.validate.unnumber:2:223:
error: unknown element "news" from namespace
"http://www.nomensa.com/2004/news"
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org