Closed choppsv1 closed 5 years ago
yang2dsdl is a shell script that uses xsltproc for XSLT processing, which knows nothing about Python virtualenv. The solution is to set the environment variable PYANG_XSLT_DIR
to the directory within the virtualenv in which the pyang XSLT stylesheets reside.
I don't care what yang2dsdl is written in or does to implement it's functionality, I run it it doesn't find it's own files, I say that's broken. :)
If I was going to fix this I'd have yang2dsdl set/add-to PYANG_XSLT_DIR to include the directory that pyang has installed the xslt in.
Since no reply I'll open a new issue. :)
yang2dsdl is a shell script that uses xsltproc for XSLT processing, which knows nothing about Python virtualenv. The solution is to set the environment variable
PYANG_XSLT_DIR
to the directory within the virtualenv in which the pyang XSLT stylesheets reside.
Can you explain in detail
For example, my .bashrc
file contains the line
export PYANG_XSLT_DIR=$HOME/Projects/pyang/xslt
For example, my
.bashrc
file contains the lineexport PYANG_XSLT_DIR=$HOME/Projects/pyang/xslt
Yep this worked✌️
This worked for me:
gedit ~/.bashrc
And add following lines:
export PYANG_XSLT_DIR=$HOME/pyang/xslt
export PYANG_RNG_LIBDIR=$HOME/pyang/schema
Note that env.sh
includes these lines:
export PYANG_XSLT_DIR="$PWD/xslt"
export PYANG_RNG_LIBDIR="$PWD/schema"
Hi,
Yes, but I think my issue was caused due to the following lines in yang2dsdl
:
xslt_dir=${PYANG_XSLT_DIR:-/usr/local/share/yang/xslt}
schema_dir=${PYANG_RNG_LIBDIR:-/usr/local/share/yang/schema}
yang2dsdl does not search in python virtual environment for xslt files