|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] querying attribute?Thomas R. Jones thomas.jones at maitreyasecurity.comWed Mar 18 13:06:10 PST 2009
Hello all, I have the following code: <tests xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5"> <rpminfo_test xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" check="all" comment="apache2 is installed" id="oval:com.maitreyasecurity:tst:674" version="1"> <object object_ref="oval:com.maitreyasecurity:obj:674"/> <state state_ref="oval:com.maitreyasecurity:ste:500"/> </rpminfo_test> </tests> I am trying everything i can think of to return the attribute value but am hanging up on the namespace(i think). I believe because the attribute is not prefixed that it is located within a NULL namespace and not the element default namespace declared----correct? Here is my xquery: declare default element namespace "http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"; for $attr in document("apache2.package.novell.maitreyasecurity.en_US.xml","inventory.a")/tests/rpminfo_test/@id return string($attr) Ideas? Thank you for your time. Thomas Jones
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






