XPath expression -- problem with namespace
Posted: Sat Sep 25, 2004 1:19 am
I have no idea what is wrong here. Consider this XML Schema
If I write this //xs:element[xs:complexType[@*='node']] XPath expression to the XPath "comboBox" it corectly returns /xs:schema[1]/xs:element[1]. However if I change "*" for "dm:displayType" i.e. use the XPath expression //xs:element[xs:complexType[@dm:displayType='node'] Oxygen reports the following: Invalid XPath expression Prefix must resolve to a namespace dm:
Can anyone provide me with some hint?
Thanks a lot!
K!lhor
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright P&P Software GmbH (Zurich, Switzerland) -->
<xs:schema
targetNamespace="http://www.pnp-software.com/fmt/fm"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:dm="http://www.pnp-software.com/fmt/displayModel"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:element name="FeatureNode">
<xs:complexType dm:displayType="node">
<xs:choice>
<xs:element name="foo">
<xs:complexType>
<xs:choice>
<xs:element name="bar" type="xs:string"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
Can anyone provide me with some hint?
Thanks a lot!
K!lhor