Thank you for the reply Robert; however, I cannot get it to work still.
I left out a lit bit of the xml when I wrote the first post.  Both cases
have already have a namespace defined for them.


Case 1)  These two lines would be added to both cases.  The actual file
reads:
<doc:iso_10303_28 xmlns:exp="urn:oid:1.0.10303.28.2.1.1"
xmlns:doc="urn:oid:1.0.10303.28.2.1.3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oid:1.0.10303.28.2.1.1 ex.xsd" version="2.0">
  <uos id="uos_1" description="" configuration="i-ifc2x3" edo=""
xmlns="http://www.iai-tech.org/ifcXML/IFC2x3/FINAL"
xsi:schemaLocation="http://www.iai-tech.org/ifcXML/IFC2x3/FINAL
ifc2x3.xsd">
    <IfcWallStandardCase id="i17855">
      <Representation>
        <IfcProductDefinitionShape id="i17925">
          <Representations id="i17928" exp:cType="list">
            <IfcShapeRepresentation exp:pos="0" xsi:nil="true"
ref="i17886"/>
            <IfcShapeRepresentation exp:pos="1" xsi:nil="true"
ref="i17919"/>
          </Representations>
        </IfcProductDefinitionShape>
      </Representation>
    </IfcWallStandardCase>
  </uos>
</doc:iso_10303_28>

The exact code I have been trying to run is:

$http = "http://www.iai-tech.org/ifcXML/IFC2x3/FINAL"
ref = "i17855"
$doc_noko = Nokogiri::XML(File.read(filename))

x = $doc_noko.xpath("//uosNS:*[@id='#{ref}']//uosNS:*[@pos='1']",
{"uosNS" => $http})
#=> nil

It reads for "//uosNS:*[@id='#{ref}']"  but the "//uosNS:*[@pos='1']"
is where it is not working as intended returning a nil value.  With 
these two new lines in mind any ideas for the two cases?

-- 
Posted via http://www.ruby-forum.com/.