in reply to PERL LibXML reading xml file with namespace not reading the file

$ xmllint --xpath "/*[ name() = 'alto' ] /*[ name() = 'Description' ] +/*[ name() = 'MeasurementUnit' ]" alto.xml <MeasurementUnit>inch1200</MeasurementUnit>

Based on:
perl xpather.pl --all alto.xml

/* # posy /alto[1] # star /*[ name() = "alto" and position() = 1 and @xsi:schemaLocation = "http +://www.loc.gov/standards/alto alto-v2.0.xsd" and @xmlns = "http://www +.loc.gov/standards/alto/ns-v2#" and @xmlns:xsi = "http://www.w3.org/2 +001/XMLSchema-instance" ] # rats /*[ name() = "alto" and position() = 1 and @xsi:schemaLocation = "http +://www.loc.gov/standards/alto alto-v2.0.xsd" and @xmlns = "http://www +.loc.gov/standards/alto/ns-v2#" and @xmlns:xsi = "http://www.w3.org/2 +001/XMLSchema-instance" ] # "content" inch1200 ------ /*/* # posy /alto[1]/Description[1] # star /*[ name() = "alto" and position() = 1 and @xsi:schemaLocation = "http +://www.loc.gov/standards/alto alto-v2.0.xsd" and @xmlns = "http://www +.loc.gov/standards/alto/ns-v2#" and @xmlns:xsi = "http://www.w3.org/2 +001/XMLSchema-instance" ] /*[ name() = "Description" and position() = 1 ] # rats /*[ name() = "alto" and position() = 1 and @xsi:schemaLocation = "http +://www.loc.gov/standards/alto alto-v2.0.xsd" and @xmlns = "http://www +.loc.gov/standards/alto/ns-v2#" and @xmlns:xsi = "http://www.w3.org/2 +001/XMLSchema-instance" ] /Description[1] # "content" inch1200 ------ /*/*/* # posy /alto[1]/Description[1]/MeasurementUnit[1] # star /*[ name() = "alto" and position() = 1 and @xsi:schemaLocation = "http +://www.loc.gov/standards/alto alto-v2.0.xsd" and @xmlns = "http://www +.loc.gov/standards/alto/ns-v2#" and @xmlns:xsi = "http://www.w3.org/2 +001/XMLSchema-instance" ] /*[ name() = "Description" and position() = 1 ] /*[ name() = "MeasurementUnit" and position() = 1 ] # rats /*[ name() = "alto" and position() = 1 and @xsi:schemaLocation = "http +://www.loc.gov/standards/alto alto-v2.0.xsd" and @xmlns = "http://www +.loc.gov/standards/alto/ns-v2#" and @xmlns:xsi = "http://www.w3.org/2 +001/XMLSchema-instance" ] /Description[1] /MeasurementUnit[1] # "content" inch1200 ------

:) I'm beginning to think every xml file that needs a namespace registered is a broken xml file -- the file should register any namespace it uses