private String readNamespaceAttr ( Document doc ) { // lazy loading is mostly pointless but it keeps things together if ( namespaceExpr == null ) { namespaceExpr = initNamespaceAttrExpression ( ) ; } String s ; try { s = namespaceExpr . evaluate ( doc ) ; } catch ( XPathExpressionException e ) { throw new PluginException ( "Error evaluating namespace XPath expression: " + e , e ) ; } // xpath returns an empty string if not found, null is cleaner for callers return ( s == null || s . length ( ) == 0 ) ? null : s ; }
Retrieve namespace attr of interface definition or null if not found