Package net.sf.saxon.pattern
Class UnionQNameTest
java.lang.Object
net.sf.saxon.pattern.UnionQNameTest
- All Implemented Interfaces:
QNameTest
A QNameTest that is the union of a number of supplied QNameTests
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExport the QNameTest as a string for use in a SEF file (typically in a catch clause).generateJavaScriptNameTest
(int targetVersion) Generate Javascript code to test if a name matches the test.boolean
matches
(StructuredQName qname) Test whether the QNameTest matches a given QNametoString()
The toString() method defines the format used in a package export, so it must be re-parseable
-
Field Details
-
tests
-
-
Constructor Details
-
UnionQNameTest
-
-
Method Details
-
matches
Test whether the QNameTest matches a given QName -
toString
The toString() method defines the format used in a package export, so it must be re-parseable -
exportQNameTest
Export the QNameTest as a string for use in a SEF file (typically in a catch clause).- Specified by:
exportQNameTest
in interfaceQNameTest
- Returns:
- a string representation of the QNameTest, suitable for use in export files. The format is a sequence of alternatives separated by spaces, where each alternative is one of '*', '*:localname', 'Q{uri}*', or 'Q{uri}local'.
-
generateJavaScriptNameTest
Generate Javascript code to test if a name matches the test.- Specified by:
generateJavaScriptNameTest
in interfaceQNameTest
- Parameters:
targetVersion
- the version of SaxonJS being targeted- Returns:
- JS code as a string. The generated code will be used as the body of a JS function in which the argument name "q" is an XdmQName object holding the name. The XdmQName object has properties uri and local.
-