mbj4668 / pyang

An extensible YANG validator and converter in python
ISC License
533 stars 343 forks source link

JSON file is not generated using 'xsltproc' plugin #633

Open aman1403 opened 4 years ago

aman1403 commented 4 years ago

I am trying to convert xml to json using XSL stylesheet. I have generated the XSL stylesheet but not able to generate json with the help of it. I am using this command:- xsltproc -o bgp-rib.json bgp-json.xsl bgp-rib.xml This command is running and not throwing any error. But the JSON file is also not generated. I don't know what is wrong may be xml file or xsl. Can anyone please tell what can be done in this case and how we can check if anything is wrong? image

fredgan commented 4 years ago

Hi Ladislav @llhotka , would you mind having a look at this issue?

llhotka commented 4 years ago

@aman1403 please provide (a link to) the YANG module bgp-rip@2018-03-29.yang that you use, and the XML instance document bgp-rip.xml.

aman1403 commented 4 years ago

@llhotka please find the link for the Yang module and the xml file below:-

  1. bgp-rib.xml 2.bgp-rib@2018-03-29.yang
llhotka commented 4 years ago

The top-level node rib isn't defined in the YANG module. I think the document element in bgp-rib.xml should be

<application-rib xmlns="urn:opendaylight:params:xml:ns:yang:bgp-rib">
    ...
</application-rib>