=?ISO-8859-1?Q?Re=3A=20=27Re=3A=20=22=5Bxml=5D=20Unimplemented=20block=20at=20xmlschemas=2Ec=3A4185=20causes=20bus=20error=22=27?=



Hi Stefan,

on 6/30/2004 1:08 PM Stefan Kost wrote:

Hi Kasimier,

according to some posting, it might already be fixed in CVS. I run the lastest
release. Anyway attached are the files. I have left them unchanged as the files
are short anyway. For reference I've also attached the dc.xsd which normally is
fetched from the net.

many thanks for all the work you already have done on the xml schema component!

[...]
<giml xmlns="http://gitk.sourceforge.net/";
      xmlns:dc="http://purl.org/dc/elements/1.1/";
      xmlns:i18n="http://apache.org/cocoon/i18n/2.0";
      >
  <dialog focus="ctrl">
    <meta>
      <dc:title><i18n:text>message</i18n:text></dc:title>
    </meta>

Unfortunately substitution groups are not yet implemented. This is what 
the current implementation really does: it finds <dc:title>, and, 
because the corresponding element declaration has no type defined, it 
skips the content check. In other words: anything inside <dc:title> is 
not validated by now. I'll try to move the support for substitution on 
top on my schedule.

[...]
<xs:schema targetNamespace="http://gitk.sourceforge.net/";
              xmlns="http://gitk.sourceforge.net/";
              xmlns:xs="http://www.w3.org/2001/XMLSchema";
              xmlns:dc="http://purl.org/dc/elements/1.1/";
              xmlns:i18n="http://apache.org/cocoon/i18n/2.0/";>
      <xs:annotation>
              This schema describes giml dialog sources 
  </xs:annotation>

This one needs a tiny tweak; the content of annotation: (appinfo | 
documentation)*, so just put a <appinfo> or <documentation> around your 
character content. Again, this is not checked by now. Actually the spec 
assumes the XSD to be validated against the schema for schemas XSD; but 
I don't know if Daniel ever intended to do this, or to hardcode the 
constraints defined by the schema for schemas XSD. To go unharmed, try 
to be sure that your schemas follow the spec as much as possible. The 
current processor is vulnerable on some spots regarding the validity of 
the schema itself.

[..]
<xs:complexType name="SimpleLiteral">
   <xs:complexContent mixed="true">
    <xs:restriction base="xs:anyType">
     <xs:sequence>
      <xs:any processContents="lax" minOccurs="0" maxOccurs="0"/>
     </xs:sequence>
     <xs:attribute ref="xml:lang" use="optional"/>
    </xs:restriction>
   </xs:complexContent>
  </xs:complexType>

Here we have the part that produces the "implemented block": <xs:any 
.../> is not implemented yet.

  <xs:element name="any" type="SimpleLiteral" abstract="true"/>

  <xs:element name="title" substitutionGroup="any"/>

And here is the obove mentioned unsupported "substitutionGroup".

It would be very kind, if you could add a bug-report to bugzilla [1] 
regarding the unsupported "substitutionGroup" and the check for 
character content of <annotation>.

[1] http://bugzilla.gnome.org/buglist.cgi?product=libxml2


Regards,

Kasimier




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]