pls.xsd schema not reflecting the recommendation

Domenico Cuciti <[email protected]> Fri, 11 Mar 2016 19:55:17 +0000
Newsgroups gmane.comp.web.voice
Message-ID <CAEt4PGcxwhzid_TVO=q-_qdQp69s40Vi2WU4mQ5CMSc3tNRwHw@mail.gmail.com>
--001a114118c6fa9383052dcb4fd1
Content-Type: text/plain; charset=UTF-8

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

[1]: https://www.w3.org/TR/pronunciation-lexicon/pls.xsd
[2]: https://www.w3.org/TR/pronunciation-lexicon/#AppA
[3]: https://www.w3.org/TR/pronunciation-lexicon/#S4.4

--001a114118c6fa9383052dcb4fd1
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi,<div><br></div><div>I was trying to validate some PLS d=
ocuments 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.</div>=
<div><br></div><div>In particular:</div><div>the specification of the &lt;l=
exeme&gt; element requires at least one &lt;grapheme&gt; and one among &lt;=
alias&gt;|&lt;phoneme&gt; [3].</div><div><br></div><div>Unfortunately the x=
sd schema defines the &lt;lexeme&gt; element as follows:</div><div><br></di=
v><div><div>&lt;xs:element name=3D&quot;lexeme&quot;&gt;</div><div>=C2=A0 =
=C2=A0 &lt;xs:complexType&gt;</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;xs:=
choice minOccurs=3D&quot;0&quot; maxOccurs=3D&quot;unbounded&quot;&gt;</div=
><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;xs:element ref=3D&quot;=
p:grapheme&quot;/&gt;</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &=
lt;xs:choice&gt;</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 &lt;xs:element ref=3D&quot;p:phoneme&quot;/&gt;</div><div>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;xs:element ref=3D&quot=
;p:alias&quot;/&gt;</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt=
;/xs:choice&gt;</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;xs:=
element ref=3D&quot;p:example&quot;/&gt;</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 &lt;/xs:choice&gt;</div></div><div>[...]</div><div><br></div><div>Which=
 would validate as correctly formed lexemes the following:</div><div><br></=
div><div>&lt;lexeme/&gt;</div><div>&lt;lexeme&gt;</div><div>=C2=A0 =C2=A0 =
=C2=A0&lt;example&gt;lexeme with only an example&lt;/example&gt;</div><div>=
&lt;/lexeme&gt;</div><div>&lt;lexeme&gt;</div><div>=C2=A0 =C2=A0 =C2=A0&lt;=
phoneme&gt;lexeme with a phoneme but no grapheme&lt;/phoneme&gt;</div><div>=
&lt;/lexeme&gt;</div><div>&lt;lexeme&gt;</div><div>=C2=A0 =C2=A0 =C2=A0 &lt=
;alias&gt;lexeme with an alias but no grapheme&lt;/alias&gt;</div><div>&lt;=
/lexeme&gt;</div><div>&lt;lexeme&gt;</div><div>=C2=A0 =C2=A0 =C2=A0&lt;grap=
heme&gt;grapheme without any alias nor phoneme&lt;/grapheme&gt;</div><div>&=
lt;/lexeme&gt;</div><div><br></div><div>These are all invalid PLS lexemes a=
ccording to the recommendation.</div><div><br></div><div>I thought I&#39;d =
share my findings with the workgroup.</div><div><br></div><div>Regards,</di=
v><div><br></div><div>Domenico Cuciti</div><div><br></div><div>[1]:=C2=A0<a=
 href=3D"https://www.w3.org/TR/pronunciation-lexicon/pls.xsd">https://www.w=
3.org/TR/pronunciation-lexicon/pls.xsd</a></div><div>[2]: <a href=3D"https:=
//www.w3.org/TR/pronunciation-lexicon/#AppA">https://www.w3.org/TR/pronunci=
ation-lexicon/#AppA</a></div><div>[3]:=C2=A0<a href=3D"https://www.w3.org/T=
R/pronunciation-lexicon/#S4.4">https://www.w3.org/TR/pronunciation-lexicon/=
#S4.4</a></div></div>

--001a114118c6fa9383052dcb4fd1--