cvc-complex-type validation errors

C

C.W.Holeman II

I am using Firefox for details see:

http://emle.sourceforge.net/emle020100/ng20070620_context.html

http://emle.sourceforge.net/emle020100/ng20070621_emle_lab_011.xsd and
http://emle.sourceforge.net/emle020100/lab/ng20070621_emle_lab_011.xml
pass these validation tests with no errors:

http://syseng.nist.gov/b2bTestbed/projects/xmlvalidation/schema_validation.html
http://syseng.nist.gov/b2bTestbed/projects/xmlvalidation/instance_validation.html

but XMLmind XML Editor Personal Edition 3.6.0 produces these errors:

[1] the sequence of child elements is incorrect [cvc-complex-type.2.4]
[2] element has no attribute "refid" [cvc-complex-type.3]

regarding XML fragment:

<equipment refid="3" />

edited XML Schema fragment:

<xsd:complexType name="EquipmentType">
<xsd:sequence minOccurs="0">
<xsd:element
minOccurs="0"
name="id"
type="xsd:positiveInteger" />
<xsd:element
minOccurs="0"
name="title"
type="xsd:string" />
<xsd:element
maxOccurs="unbounded"
minOccurs="0"
name="value"
type="ValueType" />
</xsd:sequence>
<xsd:attribute
name="refid"
type="xsd:positiveInteger"
use="optional" />
</xsd:complexType>

I do not understand what wrong that produces the errors.

This is what I am doing with emle:equipment in the XSL file:

<xsl:template match="emle:equipment">
<xsl:choose>
<xsl:when test="@refid">
<xsl:apply-templates ... />
</xsl:when>
<xsl:eek:therwise>
... <xsl:apply-templates select="emle:value" /> ...
</xsl:eek:therwise>
</xsl:choose>
</xsl:template>

Other files referenced in the XML and XSL files:

http://emle.sourceforge.net/emle020100/ng20070621_emle_lab_011.xsl
http://emle.sourceforge.net/emle020100/ng20070621_emle_lab.css
http://emle.sourceforge.net/emle020100/ng20070621_emle_lab.js
http://emle.sourceforge.net/emle020100/equipment/ng20070621_emle_equipment_3.xml
http://emle.sourceforge.net/emle020100/instructions/ng20070621_emle_instructions_11.xml
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top