RE: assigning schema to appInfo elements

> After examining the XML Schema schema, I've learned that the
> appInfo element
> can contain any XML that is necessary. I am wondering if there is
> anyway to
> impose a schema on the contents of the appInfo element.

Impose is a liitle too strong a word. appInfo has validation set to lax,
which means it will validate if a schema is present.

> I have tried various approaches, using both Xerces 1.3 and XMLSpy 3.5 for
> validation. I was not able to find any way to do this. My failed
> approaches
> include (please don't laugh):

This is processor dependent. For instance, with XSV, you would specify your
additional schema on the command line.

> + specifying appInfo like this:
>
>     <appInfo xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
>              xsi:noTargetNamspace="appInfoSchema.xsd">
>         <className>org.foo.bar.MyClass</className>
>         <mapping method="FirstName" element="firstName" type="boolean"/>
>     </appInfo>

I would strongly reccomend againsts using no namespace for an appInfo
extension. Using a namespace may help resolve the issue in these other
tools.

David Cleary
Progress Software

Received on Friday, 2 March 2001 09:05:52 UTC