xmllint : validate an XML file against two XSD schemas (envelope / payload)

前端 未结 3 1002
甜味超标
甜味超标 2021-02-02 13:04

I am using xmllint to do some validations and I have an XML instance document which needs to validate against two schemas: one for the outer \"envelope\" (which includes an

3条回答
  •  情深已故
    2021-02-02 13:32

    You can create a wrapper schema and import both namespaces. AB.xsd:

    
    
        
        
    
    

    Then:

    xmllint --schema AB.xsd ab.xml
    
    
    
                
                    Mary
                    Bones
                
    
    
    ab.xml validates
    

提交回复
热议问题