Example #1
0
        /// <summary>
        /// Get the namespace URI part of a QName provided in lexical form (<c>prefix:localname</c>)
        /// </summary>
        /// <param name="lexicalName">The lexical QName. This may either be a plain <c>NCName</c> (a local name
        /// with no prefix or colon) or a lexical name using a prefix that is bound to a namespace.</param>
        /// <param name="useDefault">Set to true if the default namespace for elements and types is to be used
        /// in the case where there is no prefix. If false, no prefix means no namespace.</param>
        /// <returns>The namespace URI associated with the prefix (or absence thereof) in the supplied
        /// lexical QName. The "null namespace" is represented by a zero length string. The method returns null
        /// if there is no known binding for the prefix used in the lexical QName.</returns>

        public string GetNamespaceURI(string lexicalName, Boolean useDefault)
        {
            String[] parts = net.sf.saxon.om.NameChecker.checkQNameParts(net.sf.saxon.value.Whitespace.trimWhitespace(lexicalName));

            return(compiler.getUnderlyingStaticContext().getNamespaceResolver().getURIForPrefix(parts[0], useDefault));
        }
Example #2
0
        public void DeclareCollation(Uri uri, CompareInfo compareInfo, CompareOptions options, Boolean isDefault)
        {
            JDotNetComparator comparator = new JDotNetComparator(uri.ToString(), compareInfo, options);

            ((net.sf.saxon.sxpath.AbstractStaticContext)compiler.getUnderlyingStaticContext()).declareCollation(uri.ToString(), comparator, isDefault);
        }