MHonArc v2.5.0b2 -->
office message
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]
Subject: Re: [office] vialotaion of relaxng schema constraints
Hi,
Lars is right. According to �7.1.3 of
http://www.oasis-open.org/committees/relax-ng/spec.html
refs within lists are in fact prohibited. This issue could be resolved by
a) replacing the reference with the content of the reference definition, or
b) by replacing the lists themselves with a string data type.
While the first solution increases the size of the schema and makes it
harder to read, the 2nd solution makes the schema less strict regarding
validations
I've checked the occurences of "ref" within "list" in our spec. Where
are two kinds of them:
1. References to data types. The data types referenced are: integer,
double, percent, length, positiveLength.
2. References to defines containing choices of values. An example is the
definition of "style:position" in "15.4.23 Paragraph Background Color".
It seems that solution a) doesn't make the schema completely unreadable
in both cases, so I propose to choose that option.
Michael
Lars Oppermann wrote:
> Hi folks,
>
> I just checked out validation of some documents against the schema with
> libxml2's xmllint. I have never used that before but wanted to check out
> libxml2's relaxng support.
> Well, lots of errors but all of the same type:
>
> office-schema-1.0-draft-19.rng:13704: element ref: Relax-NG parser error
> : Found forbidden pattern list//ref
>
> And it's right, ref isn't allowed in lists; (see section 'list
> constraints' at http://books.xmlschemata.org/relaxng/ch17s02.html)
>
> I'm not quite sure about the implications of this, since I'm not an
> expert at all on relaxng matters. Replacing refs with the original
> definition would fix the error but we'd lose the nice abstraction level
> we've got by using defines for patterns (like e.g. percent)
>
> Any suggestions?
>
> Bests
> ~Lars
>
--
Michael Brauer Phone: +49 40 23646 500
Technical Architect Software Engineering Fax: +49 40 23646 550
StarOffice Development
Sun Microsystems GmbH
Sachsenfeld 4
D-20097 Hamburg, Germany e-mail: michael.brauer@sun.com
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]