Hello,
The attached schema file is valid by all rules, but flagged with multiple
"Element xxx is not allowed here" errors in IDEA. Validating it, however,
shows 0 errors. Validating an instance document with the given schema also
seems to work.
regards,
Christian
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
AML - Acquisition Markup Language
Copyright (c) 2000 Christian Sell EDV-Beratung. All rights reserved.
Version: $Id: wcf-cache.xsd,v 1.2 2002/03/15 01:08:42 cse Exp $
Author: $Author: cse $
conforming to XMLSchema 2000/10 RC
-->
<xsd:schema
targetNamespace="http://www.dynabeans.com/CML"
xmlns:wcf="http://www.dynabeans.com/CML"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
attributeFormDefault="unqualified" elementFormDefault="qualified" version="1.0">
<!--===============================
acquisition registry root element
=================================-->
<xsd:element name="cache-registry">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="cache-entry" type="wcf:cache-entry" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<!--===============================
a cached URL
=================================-->
<xsd:complexType name="cache-entry">
<xsd:sequence>
<xsd:element name="url" type="xsd:string" minOccurs="0"/>
<xsd:element name="reader" type="wcf:cache-processor" minOccurs="0"/>
<xsd:element name="writer" type="wcf:cache-processor" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="storage" type="wcf:cache-processor" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:NMTOKEN" use="optional"/>
<xsd:attribute name="expire" type="xsd:integer" use="optional"/>
<xsd:attribute name="unit" use="optional">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="seconds"/>
<xsd:enumeration value="minutes"/>
<xsd:enumeration value="hours"/>
<xsd:enumeration value="days"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="checkmodified" type="xsd:boolean" use="optional"/>
</xsd:complexType>
<!--===============================
a cache writer
=================================-->
<xsd:complexType name="cache-processor">
<xsd:sequence>
<xsd:element name="parameter" type="wcf:parameter" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required"/>
</xsd:complexType>
<!--======================================
parameter type (same as wcf-main.xsd)
=========================================-->
<xsd:complexType name="parameter" mixed="true">
<xsd:attribute name="name" type="xsd:NMTOKEN" use="required"/>
</xsd:complexType>
</xsd:schema>