Hello,
My apologies in advance if this is bone-headed post.
I was wondering if using leafref in one module to reference a node in a different module is supported. I've attached two YANG modules that I used for testing, and their corresponding schematron stylesheets.
From the output I have, it looks like there isn't enough information for the schematron stylesheet to perform this type of validation, where there's referencing across modules.
The output I have shows that when schematron stylesheet is applied during validation in xsltApplyStylesheet() , the xmlDoc is contains data only from module leafrefs2. However, the schematron stylesheet for module leafrefs2 doesn't have information about module leafrefs.
So, is it my fault or is this an issue in libnetconf?
Thanks,
Helen
P.S. When I tried to configure leafrefs2's l4 using this RPC:
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="106"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:l="
http://example.com/leafrefs"
xmlns:l2="
http://example.com/leafrefs2">
<edit-config>
<target>
<running />
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<l2:l4 xmlns:l="
http://example.com/leafrefs">
<l2:id>1</l2:id>
<l2:l1-ref>abc</l2:l1-ref>
</l2:l4>
</config>
</edit-config>
</rpc>
]]>]]>
A snippet of what I believe to be the relevant libxslt output:
xsltProcessOneNode: applying template '/nc:data/l2:l4/l2:l1-ref' for l1-ref
xsltApplySequenceConstructor: copy node fired-rule
xsltIf: test not($root/l:l1/l:name=.)
Lookup variable 'root'
found variable 'root'
XPath error : Undefined namespace prefix
xsltIf: test evaluate to -1