Hi Webster,
According to the schema spec, the only way to get at non-schema attributes
that occur on elements in schema documents is via <annotation> elements.
In other words, you'd need to do something like this in your schema:
<xs:schema
targetNamespace="http://test"
xmlns:test="http://test"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xlink="http://xlink/schema" >
<xs:element name="myTest" id="identity123" xlink:href="
http://link/to/further/documentation" type="xs:string" >
<xs:annotation>
<xs:documentation>
place holder to get at non-schema attribute xlink:href
</xs:documentation>
</xs:annotation
</xs:element>
</xs:schema>
Note that "id" is a schema attribute, and the spec provides no way to get
at that at all; it disappears during the transformation of the schema
documents into schema components.
All this hinges on having access to representations of annotation
components. I'm working on this as we speak, and expect to have something
in CVS by the end of next week at the latest. I'd be very grateful if you
(and anyone else!) could play with the code and let me know about bugs so I
that can fix them while it's fresh in my mind.
Thanks,
Neil
Neil Graham
XML Parser Development
IBM Toronto Lab
Phone: 905-413-3519, T/L 969-3519
E-mail: [EMAIL PROTECTED]
|---------+---------------------------->
| | [EMAIL PROTECTED]|
| | einc.com |
| | |
| | 06/19/2003 05:08 |
| | PM |
| | Please respond to|
| | xerces-j-user |
| | |
|---------+---------------------------->
>---------------------------------------------------------------------------------------------------------------------------------------------|
|
|
| To: [EMAIL PROTECTED]
|
| cc:
|
| Subject: How to get the definition from an validated instance?
|
|
|
|
|
>---------------------------------------------------------------------------------------------------------------------------------------------|
Sorry in advance if this is not the right list...
I wish to parse and validate an instance document against a XML-Schema
definition, but in addition to grabbing and using the PSVI material, I
would like to examine the contents of the validating component in the
definition for further processing. This extra material associated with the
validating component is namespaced, for example:
<xs:schema
targetNamespace="http://test"
xmlns:test="http://test"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xlink="http://xlink/schema" >
<xs:element name="myTest" id="identity123" xlink:href="
http://link/to/further/documentation" type="xs:string" />
</xs:schema>
Specifically, I have an XNI component pipelined to follow the
SchemaValidator, and while I can get at the PSVI housed in the
Augmentations from the 'streaming infoset', I am not able to see the entire
content model of the definition.
I have tried to get to both the 'id' attribute and the 'xlink:href'
attribute from the ElementPSVI's XSElementDeclaration object and even
explored a bit into the associated type definition objects, but no avail.
How can I get to the underlying definition from within XNI?
Thanks!
Webster Mudge
Senior Systems Developer
Internet Technology Group
[EMAIL PROTECTED]
-----------------------------------------------------------------------
This message is the property of Time Inc. or its affiliates. It may be
legally privileged and/or confidential and is intended only for the use
of the addressee(s). No addressee should forward, print, copy, or
otherwise reproduce this message in any manner that would allow it to be
viewed by any individual not originally listed as a recipient. If the
reader of this message is not the intended recipient, you are hereby
notified that any unauthorized disclosure, dissemination, distribution,
copying or the taking of any action in reliance on the information
herein is strictly prohibited. If you have received this communication
in error, please immediately notify the sender and delete this message.
Thank you.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]