pls.xsd schema not reflecting the recommendation

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

pls.xsd schema not reflecting the recommendation

Domenico Cuciti
Hi,

I was trying to validate some PLS documents using the latest schema available [1], that was referenced in the Appendix A of the PLS recommendation [2], when I took a closer look at the schema itself and found a discrepancy with the recommendation itself.

In particular:
the specification of the <lexeme> element requires at least one <grapheme> and one among <alias>|<phoneme> [3].

Unfortunately the xsd schema defines the <lexeme> element as follows:

<xs:element name="lexeme">
    <xs:complexType>
        <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element ref="p:grapheme"/>
            <xs:choice>
                <xs:element ref="p:phoneme"/>
                <xs:element ref="p:alias"/>
            </xs:choice>
            <xs:element ref="p:example"/>
        </xs:choice>
[...]

Which would validate as correctly formed lexemes the following:

<lexeme/>
<lexeme>
     <example>lexeme with only an example</example>
</lexeme>
<lexeme>
     <phoneme>lexeme with a phoneme but no grapheme</phoneme>
</lexeme>
<lexeme>
      <alias>lexeme with an alias but no grapheme</alias>
</lexeme>
<lexeme>
     <grapheme>grapheme without any alias nor phoneme</grapheme>
</lexeme>

These are all invalid PLS lexemes according to the recommendation.

I thought I'd share my findings with the workgroup.

Regards,

Domenico Cuciti