2014-02-13 3 views
0

명령 :
xmllint myfile.xml - xpath 'MapField2Data [@ country = "FR"]/* [@ 활성! = "false "여부 (@active)] '는 XSD에서 그것을 사용하려고 내 XML 구조xmllint xsd : xpath 또는 --shell과 다른 xpath 동작

그러나에 대한을 예상대로
작품, 그것은 컴파일에 실패 :

xmllint가을 - loaddtd - noout --noent --xin clude --schema XSD/pnsConf.xsd pnsConf.xml
XSD/pnsConf.xsd : 75 : 선택 소자 : 스키마 파서 오류 : 요소 '{} http://www.w3.org/2001/XMLSchema 선택기'속성 '의 XPath'다음 XPath 식 'MapField2Data [@ country = "FR"]/* [@ 활성! = "거짓"또는 없음 (@active)] '을 (를) 컴파일 할 수 없습니다..

내 XSD는 'MapField2Data/*'와 같은 간단한 XPath는이 두 경우 모두에서 잘 작동 적절한

<xsd:selector xpath='MapField2Data[@country="FR"]/*[@active!="false" or not(@active) ]'/> 

있습니다.
이것은 xmllint 또는 libxml2의 버그 또는 누락 된 기능과 같습니다.
그놈 버그 질라에 xmllint에 대한 버그를 제출해야합니까?

아마도 내 문제의 또 다른 해결책가 있습니까? 내가 원하는
는 "활성"태그는 고유하고 이곳과 같은 구조에서 비활성 태그를 무시 :

<MapField2Data country='FR' > 
    <raw id='NoUnReadMails' active='true'> 
      <depend ref='_EndMailNotif'/> 
      <depend ref='_EndMailSub' /> 
    </raw> 
    <raw id='NoUnReadMails' active='false'> 
      <depend ref='_EndMailNotif'/> 
      <depend ref='_EndMailSub' /> 
    </raw> 
    <raw id='NoEMails' > 
      <depend ref='_EndMailNotif'/> 
      <depend ref='_EndMailSub' /> 
    </raw> 
... 

안부, 임마누엘.

답변