Hi
The ocr elements come from another schema
(urn.oma.xml.xdm.common.policy.xsd) which was attached in the original
message.
Any way it looks like the schema urn.oma.xml.xdm.common.policy.xsd,
needs an update:
<xs:schema targetNamespace="urn:oma:xml:xdm:common-policy"
xmlns="urn:oma:xml:xdm:common-policy"
xmlns:xs="
http://www.w3.org/2001/XMLSchema
<
http://www.w3.org/2001/XMLSchema> "
elementFormDefault="qualified" attributeFormDefault="unqualified">
<!-- OMA specific "conditions" child elements -->
<xs:element name="other-identity" type="emptyType" />
<xs:element name="external-list">
<xs:complexType>
<xs:sequence>
<xs:element name="entry" type="anchorType" minOccurs="0"
maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="anonymous-request" type="emptyType" />
<xs:complexType name="anchorType">
<xs:attribute name="anc" type="xs:anyURI" />
<xs:anyAttribute processContents="lax" />
</xs:complexType>
<xs:complexType name="emptyType" />
</xs:schema>
I have changed it to the following and works fine. And it doesn't make
any difference in meaning.
<xs:schema targetNamespace="urn:oma:xml:xdm:common-policy"
xmlns="urn:oma:xml:xdm:common-policy"
xmlns:xs="
http://www.w3.org/2001/XMLSchema
<
http://www.w3.org/2001/XMLSchema> "
elementFormDefault="qualified" attributeFormDefault="unqualified">
<!-- OMA specific "conditions" child elements -->
<xs:element name="other-identity" type=">
<xs:complexType />
</xs:element>
<xs:element name="external-list">
<xs:complexType>
<xs:sequence>
<xs:element name="entry" type="anchorType" minOccurs="0"
maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="anonymous-request">
<xs:complexType />
</xs:element>
<xs:complexType name="anchorType">
<xs:attribute name="anc" type="xs:anyURI" />
<xs:anyAttribute processContents="lax" />
</xs:complexType>
<xs:complexType name="emptyType" />
</xs:schema>
Lulseged
________________________________
From: Wolfgang Laun [mailto:wolfgang.laun_at_gmail.com]
Sent: den 22 juli 2009 14:35
To: users_at_jaxb.dev.java.net
Subject: Re: unmarshalling EmptyType
Your XML data does not conform to the XML schema: RuleType has elements
conditions, actions and transformations and the id attribute, but none
of the
ocr elements.
-W
On Tue, Jul 21, 2009 at 12:42 PM, Lulseged Zerfu
<lulseged.zerfu_at_ericsson.com> wrote:
Hi
I have two schemas attached along with this e-mail:
I have a problem when unmarshalling a document made up of these
two schemas.
The extended schema urn:oma:xml:xdm:common-policy declares to
attributes(other-identity and anonymous-request) as EmptyType.
Both gets to be EmptyTypes when unmarshalling the following
document:
<?xml version="1.0" encoding="UTF-8"?>
<cr:ruleset xmlns:cr="urn:ietf:params:xml:ns:common-policy"
xmlns:pub="urn:oma:xml:prs:pub-rules"
xmlns:ocr="urn:oma:xml:xdm:common-policy">
<cr:rule id="rule-id-1">
<cr:conditions>
<cr:identity>
<cr:many />
<cr:many domain="yahoo.com">
<cr:except id="sip:aron_at_yahoo.com
<mailto:sip%3Aaron_at_yahoo.com> " />
</cr:many>
<cr:one id="sip:bethel.zerfu_at_hotmail.com
<mailto:sip%3Abethel.zerfu_at_hotmail.com> " />
</cr:identity>
<cr:sphere value="home" />
<cr:validity>
<cr:from>2009-07-01T16:00:00Z</cr:from>
<cr:until>2009-07-02T16:00:00Z</cr:until>
</cr:validity>
</cr:conditions>
<cr:actions>
<pub:perm-handling>block</pub:perm-handling>
<pub:pub-handling>block</pub:pub-handling>
</cr:actions>
<ocr:anonymous-request/> <!-- it means accept requests from
anonymous users -->
<ocr:other-identity/> <!-- it means grant rights to
users that are not listed in this document -->
</cr:rule>
</cr:ruleset>
When getting this attributes in a document like this, it has a
meaning( it means grant rights to users that are not in the document)
The problem is how to distinguish between these two attributes,
whether the attribute is anonymous-request attribute or other-identity
attribute?
Appreciate fro your help.
Lulseged
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net