- From: odwl <odwl@mac.com>
- Date: Wed, 11 Sep 2002 05:58:25 -0400 (EDT)
- To: Eddie Robertsson <erobertsson@allette.com.au>
- Cc: xmlschema-dev@w3.org
Thanks for your help. On Wednesday, September 11, 2002, at 02:05 AM, Eddie Robertsson wrote: > Hi, .......... > > What validator are you using? > The above look perfectly fine with me and validates with XML Spy 4.4 > and MSXML4. I tried this with Xerces 2.0.1 but it didn't pick up on > the error so that's a bug. I haven't tried with the latest 2.1.0 so > hopefully this is fixed in the new version. > >> Note that with the following fragment, it's OK, I have an error >> because of "Choice_3" appearing twice. >> >> <unique name="idName"> <selector >> xpath=".//View"/> >> <field xpath="@name"/> >> </unique> >> >> and I have the uniqueness of the name in all the View pages Ok, that's because I use Xerces 2.0.1. > > I am, however, very surprised that you got the above to work. Note > that your instance document use a default namespace which means that > all you elements are declared in the "http://n-side/site/ssShema" > namespace. Since XPath doesn't support the default namespace the above > uniqueness check would never match any elements and should never give > you an error. For this to work you must explicitly declare a namespace > prefix for the "http://n-side/site/ssShema" namespace in your schema > document and use that in the XPath expression: > > <xs:schema ... xmlns:s="http://n-side/site/ssShema" ...> > .... > <unique name="idName"> <selector > xpath=".//s:View"/> > <field xpath="@name"/> > </unique> > ... > </xs:schema> I don't know, but it works.... Your suggestion works as well... > > Cheers, > /Eddie Thanks a lot. > >
Received on Thursday, 12 September 2002 04:33:47 UTC