public static final String RFC6020_YANG_MEDIA_TYPE = "application/yang";
/**
- * YANG namespace, as defined in https://tools.ietf.org/html/rfc6020#section-14.
+ * YANG namespace, as defined in https://tools.ietf.org/html/rfc6020#section-14, in String format.
*/
- public static final URI RFC6020_YANG_NAMESPACE = URI.create("urn:ietf:params:xml:ns:yang:1");
+ public static final String RFC6020_YANG_NAMESPACE_STRING = "urn:ietf:params:xml:ns:yang:1";
+
+ /**
+ * YANG namespace, as defined in https://tools.ietf.org/html/rfc6020#section-14, in URI format.
+ */
+ public static final URI RFC6020_YANG_NAMESPACE = URI.create(RFC6020_YANG_NAMESPACE_STRING);
/**
* Base QNameModule for all YANG statements.
public static final String RFC6020_YIN_MEDIA_TYPE = "application/xml+yin";
/**
- * YIN namespace, as defined in https://tools.ietf.org/html/rfc6020#section-14.
+ * YIN namespace, as defined in https://tools.ietf.org/html/rfc6020#section-14, in String format.
+ */
+ public static final String RFC6020_YIN_NAMESPACE_STRING = "urn:ietf:params:xml:ns:yang:yin:1";
+
+ /**
+ * YIN namespace, as defined in https://tools.ietf.org/html/rfc6020#section-14, in URI format.
*/
- public static final URI RFC6020_YIN_NAMESPACE = URI.create("urn:ietf:params:xml:ns:yang:yin:1");
+ public static final URI RFC6020_YIN_NAMESPACE = URI.create(RFC6020_YIN_NAMESPACE_STRING);
/**
* Base QNameModule for all YIN statements.
*/
package org.opendaylight.yangtools.yang.parser.rfc7950.stmt;
-import static org.opendaylight.yangtools.yang.common.YangConstants.RFC6020_YANG_NAMESPACE;
+import static org.opendaylight.yangtools.yang.common.YangConstants.RFC6020_YANG_NAMESPACE_STRING;
import static org.opendaylight.yangtools.yang.common.YangConstants.YANG_XPATH_FUNCTIONS_PREFIX;
import com.google.common.annotations.Beta;
public static RevisionAwareXPath parseXPath(final StmtContext<?, ?, ?> ctx, final String path) {
final XPath xPath = XPATH_FACTORY.get().newXPath();
xPath.setNamespaceContext(StmtNamespaceContext.create(ctx,
- ImmutableBiMap.of(RFC6020_YANG_NAMESPACE.toString(), YANG_XPATH_FUNCTIONS_PREFIX)));
+ ImmutableBiMap.of(RFC6020_YANG_NAMESPACE_STRING, YANG_XPATH_FUNCTIONS_PREFIX)));
final String trimmed = trimSingleLastSlashFromXPath(path);
try {