Hi Zabar,
Thanks for the reply. I'm not really trying to restrict the content based on
the value of the attribute. I just want schema that will allow text or an
element type for the Value node.
I'm finding this really annoying as this CAML is supported by Microsoft and
is documented in MSDN but I can't find any schema which will validate it.
Any further help would be greatly appreciated,
Cheers,
Paul
[quoted text, click to view] "Zafar Abbas [MSFT]" <zafara@microsoft.com> wrote in message
news:#XDPoCKEFHA.3992@tk2msftngp13.phx.gbl...
> You can not restrict the content of the element based on the value of one
> the attributes of that element, in XmlSchema. You are trying to use an
> element of mixed content (both text and element content) and if so, you
can
> not restrict the text value in the element to a data type.
>
>
>
> "Paul Cheevers" <paul@brightwork.com> wrote in message
> news:uqpc1OEEFHA.3944@tk2msftngp13.phx.gbl...
> > Hi,
> >
> > I've been trying to write some schema to validate the Value element of
an
> Eq
> > element but to no avail. If the Value Element is off type DateTime then
> the
> > node should be able to contain text (the actual date string) or the
<Today
> > /> element.
> >
> > I can write schema to validate either one off the options seperately but
> > cannot write it in a way which allows either one off the options.
> >
> > Hope that makes since, any help would be greatly appreciated.
> > I've included some sample XML of what I'm trying to validate below.
> >
> > Cheers,
> > Paul
> >
> > <And>
> > <Eq>
> > <FieldRef Name="DueDate" />
> > <Value Type="DateTime">
> > <Today />
> > </Value>
> > </Eq>
> > <Eq>
> > <FieldRef Name="DueDate" />
> > <Value Type="DateTime">11/11/05</Value>
> > </Eq>
> > </And>
> >
> >
> >
>
>