[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-user
Subject:    RE: Querying Default values using XPath
From:       "Wing Yew Poon" <wpoon () bea ! com>
Date:       2006-08-30 3:40:45
Message-ID: F91503BC8AA6384BA2FFED03EF8E392C017D33FD () repbex01 ! amer ! bea ! com
[Download RAW message or body]

I would say that that is the expected behavior.
XMLBeans is schema-aware. 
XPath is not. XPath operates on what is in your xml document, and if the
attribute
is not there, it won't find it.
- Wing Yew

-----Original Message-----
From: cbryant [mailto:cbryant@solekai.com] 
Sent: Tuesday, August 29, 2006 4:52 PM
To: user@xmlbeans.apache.org
Subject: Querying Default values using XPath


Hi,

Our XSDs contain numerous instances of declared default values for
attributes. E.g.

<xs:attribute name="test" type="boolean" default="true" />

In cases where the attributes are not present in the Xml document,
querying
the attribute value via the generated XmlBeans accessor methods returns
the
default value as expected.

However, when selecting the same attribute with an XPath expression
using
the selectPath method (as we need to do, upon occasion), an empty array
is
returned.

Are we doing something wrong, or is this a deficiency in the XPath
support?

Thanks,
Coram Bryant
-- 
View this message in context:
http://www.nabble.com/Querying-Default-values-using-XPath-tf2186949.html
#a6050008
Sent from the Xml Beans - User forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic