Dear all,

I have a question regarding the restriction of whitespace in attribute
I restrict the pattern that can appear in the KEY attribute to
*"a A or a G followed by six digits, or otherwise the value 'unknown*'"
like that in the ODD:
<attDef ident="key" mode="change">
                            <desc>Key for the authority database.</desc>
                                <rng:data type="token">
(i know the regex could be shorter, but we keep it like that for legibility)

Now the schema produced from this duly records this as:
attribute key {
      xsd:token { pattern = "(A\d{6})|(G\d{6})|unknown" }
    }?, validates

and validates eg.:
<persName key="A003597">XXXX</persName>

It does however also validate KEY values with whitespace before or after the
token such as:
<persName key="    A003597">XXXX</persName>


<persName key="A003597  ">XXXX</persName>

I wish the schema could catch that, but do not understand why it doesn't.
Any ideas?

thanks for thinking about this

Dr. Marcus Bingenheimer 馬德偉
Dharma Drum Buddhist College  法鼓佛教研修學院 (DDBC)
No. 2-6 Xishihu, Jinshan  20842, Taipei County, Taiwan, R.O.C.
台灣,20842台北縣金山鄉西勢湖2-6號  Tel:  +886-2-2498-0707#2227