Re: assert error using schema 1.1

Mukul Gandhi <[email protected]>
Newsgroups gmane.text.xml.xerces-j.user
Message-ID <CABuuzNMi0DKfEVYycxrZXO3zoNfMxzYxF2xoyuZqC8fH9g4VHA@mail.gmail.com>
On Sat, Oct 27, 2012 at 12:03 AM, pa7751 <[email protected]> wrote:
> So what teh above intends is that some element has an 'output' attribute
> which is optional.

> Now the problem is that in the xml I cannot have the element without
> 'output' attribute even though I am declaring it as optional. So if the tag
> does not define the output attrbute then the xml is not validated. Could
> anyone please suggest how to mandate the optional behaviour for this
> attribute.

Your requirement seems to be ambiguous. You say, that you want to
declare an attribute as "optional" in the schema, and you also say
that, your XML instance document must have that attribute (that means,
the attribute must be "mandatory" in the schema). These statements are
contradictory.

I think, you need to specify your requirements more correctly.



-- 
Regards,
Mukul Gandhi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.