error message - cvc-complex-type.2.4.a
This should cover W3C XML Schema, Relax NG and DTD related problems.
error message - cvc-complex-type.2.4.a
hello,
i use following schematron schema:
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://www.ascc.net/xml/schematron">
....
</sch:pattern>
<sch:pattern name="The personnel number occurs several times!">
<sch:rule context="person">
<sch:report test="count(../person[@pno = current()/@pno]) > 1">The personnel number <sch:value-of select="@pno"/> at the element <sch:name/> occurs several times.</sch:report>
</sch:rule>
</sch:pattern>
</sch:schema>
i get this error description...
W cvc-complex-type.2.4.a: Invalid content was found starting with element 'sch:value-of'. One of '{"http://www.ascc.net/xml/schematron":name, "http://www.ascc.net/xml/schematron":emph, "http://www.ascc.net/xml/schematron":dir, "http://www.ascc.net/xml/schematron":span, WC[##other:"http://www.ascc.net/xml/schematron"]}' is expected.
URL: http://www.w3.org/TR/xmlschema-1/#cvc-complex-type
... but i don`t know the problem.
any help would be appreciated,
gerd f.
i use following schematron schema:
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://www.ascc.net/xml/schematron">
....
</sch:pattern>
<sch:pattern name="The personnel number occurs several times!">
<sch:rule context="person">
<sch:report test="count(../person[@pno = current()/@pno]) > 1">The personnel number <sch:value-of select="@pno"/> at the element <sch:name/> occurs several times.</sch:report>
</sch:rule>
</sch:pattern>
</sch:schema>
i get this error description...
W cvc-complex-type.2.4.a: Invalid content was found starting with element 'sch:value-of'. One of '{"http://www.ascc.net/xml/schematron":name, "http://www.ascc.net/xml/schematron":emph, "http://www.ascc.net/xml/schematron":dir, "http://www.ascc.net/xml/schematron":span, WC[##other:"http://www.ascc.net/xml/schematron"]}' is expected.
URL: http://www.w3.org/TR/xmlschema-1/#cvc-complex-type
... but i don`t know the problem.
any help would be appreciated,
gerd f.
Post by stefan »
Oxygen validates your Schematron schema according with Schematron 1.5 XSD schema located at http://www.ascc.net/xml/schematron/schematron1-5.xsd
The error message reffers to the fact that the element sch:value-of should only appear inside the Schematron element diagnostic. (parent::sch:diagnostic)
However, many people requested the use of <value-of> inside <assert> or <report> (see http://xml.ascc.net/schematron/1.3/Schematron2000.html Apending G, first point).
Hint: Even if your Schematron schema is not valid according with Schematron 1.5 specs, so you can still use your Schematron schema having sch:value-of inside <assert> or <report> to validate other xml files properly.
The error message reffers to the fact that the element sch:value-of should only appear inside the Schematron element diagnostic. (parent::sch:diagnostic)
However, many people requested the use of <value-of> inside <assert> or <report> (see http://xml.ascc.net/schematron/1.3/Schematron2000.html Apending G, first point).
Hint: Even if your Schematron schema is not valid according with Schematron 1.5 specs, so you can still use your Schematron schema having sch:value-of inside <assert> or <report> to validate other xml files properly.
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service