Hi all,

(Just starting to use Castor...)

I want to use it to access an XML schema programmatically,
through the "org.exolab.castor.xml.schema" API (which is
unique -- haven't seen any other XML schema Java API!).

So far, so good, but I haven't been able to access non-schema
attributes for an element (something permitted by the W3C spec).

Basically, there is no method on "ElementDecl" for accessing
those attributes (should be something like "getAttributes()"
or "getNonSchemaAttributes()").

Is this a bug/an ommission, or am I missing something?

To give you my rationale for using this -- simply be able to add
a short description for an element, but in a much more compact way,
without <annotation><documentation>, etc. Just simply:
<element name="myname" type="string" desc:text="description"/>

Thanks a lot,

-- Oliver

PS: Attached is the schema:

myschema.xsd:
-------------
<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"; 
        xmlns:dd="http://dd";
        xmlns:test="http://test";
        targetNamespace="http://dd";>
<import namespace="http://test"; schemaLocation="test.xsd"/>

<element name="topfield" type="string" test:test="ok"/>

</schema>

test.xsd:
---------
<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"; 
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
        xmlns:test="http://test";
        targetNamespace="http://test";>
<attribute name="test"/>
</schema>

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to