W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2001

assigning schema to appInfo elements

From: Matt Brown <matt@avolent.com>
Date: Thu, 1 Mar 2001 17:25:25 -0800
Message-ID: <DF6475EAFC16D411A05B0008C786680B0190867E@homer.justintime.com>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Hello,

The project I am currently working on makes use of XML Schema. I am looking
at making significant use of the appInfo element to embed information in the
schema that is used by a de/serializer facility to move the XML into and out
of java objects.

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.

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):

+ including the XML Schema schema via "include" and extending the appInfo
element.

+ 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>

Am I on a fools quest, or is my relative inexperience with XML Schema
causing me to overlook the answer?

(More generally, if there is a better approach to associating object mapping
information with a schema than embedding it in appInfo or storing it as a
separate XML document, I would welcome suggestions)

Any help is greatly appreciated.

-- 
Matt Brown
matt@avolent.com
Received on Thursday, 1 March 2001 20:32:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:20 GMT