OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [office] Problems validating a very simple xml file


Hi David,

there is an error in the non-strict schema: In this schema, the 
<office:meta> element may contain arbitary elements. The definition name 
for this is "anyElements". Unfortunately, these elements are not allowed 
to have text content, but only element content themselves.

If you replace the definition of "anyElements" with the follwing 
defintion, the sample document validates without errors.

<define name="anyElements">
   <zeroOrMore>
     <element>
       <anyName/>
       <mixed>
         <ref name="anyAttListOrElements"/>
       </mixed>
     </element>
   </zeroOrMore>
</define>

Best regards

Michael

David Faure wrote:
> $ cat meta.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <office:document-meta xmlns:office="urn:oasis:names:tc:openoffice:xmlns:office:1.0" xmlns:meta="urn:oasis:names:tc:openoffice:xmlns:meta:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/"; >
>  <office:meta>
>   <meta:generator>KOffice 1.3post</meta:generator>
>  </office:meta>
> </office:document-meta>
> 
> $ oasislint meta.xml
> /k/meta.xml:4:34: error: text not allowed here
> 
> where oasislint is a script that does the following
> /usr/java/j2re1.4.2_04/bin/java -jar $HOME/src/jing/bin/jing.jar -i /k/oo/office-schema-1.0-cd-1.rng $*
> 
> Text is allowed inside <meta:generator>, isn't it? Or do I read this wrongly?
> 
> <define name="office-meta-data" combine="choice">
>     <element name="meta:generator">
>         <ref name="string"/>
>     </element>
> </define>
> 
> "string" refers to <data type="string"/>, which I assume is a standard RelaxNG type...
> 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]