[xml] xmllint - Newbie THINKS there may be a whitespace error in 2.6.23
- From: "John Navratil" <jnavratil houston rr com>
- To: <xml gnome org>
- Subject: [xml] xmllint - Newbie THINKS there may be a whitespace error in 2.6.23
- Date: Tue, 25 Apr 2006 14:50:08 -0500
Greetings,
Using xmllint to validate a document thusly:
xmllint --schema test.xsd test.xml
with schema (test.xsd):
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="A">
<xs:annotation>
<xs:documentation>asdf</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="B">
<xs:complexType>
<xs:attribute name="ID" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
and document (test.xml):
<A>
<B ID="1">
</B>
</A>
I get the error:
test.xml:2: element B: Schemas validity error : Element 'B': Character
content is not allowed, because the content type is empty.
I thought that --noblanks would strip the whitespace and eliminate the
error, but find instead that I must modify the document to:
<A>
<B ID="1" />
</A>
Is this behavior correct? I observe it in 2.6.22 and 2.6.23 on Fedora
Core 4 and 5. If I remove the required attribute ("ID") from the schema
and the document, this behavior is not observed.
Sincerely,
John Navratil
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]