<xp:using> Element
Note
In this document it is assumed that the prefix xp
is bound to the namespace http://www.xmlprime.com/
.Syntax
<xp:using namespace? = string />
Attributes
- namespace
Type:string
The namespace to import.
Remarks
Note
This element is specific to XmlPrime, and is not part of the XSLT 2.0 standard.
This element can only be used inside a <xp:script><xp:script><xp:script> element.
The namespace attribute specifies the namespace to be imported for use in an <xp:script><xp:script><xp:script> script block. The following example shows how to import the System.XmlSystem.XmlSystem.Xml namespace:
<xp:using namespace="System.Xml"/>
Importing a namespace allows types in that namespace to be referenced without specifying the full name of the
type. This is analogous to a using
directive in C#, or a Visual Basic Imports
statement.
A number of namespaces are included by default:
- XmlPrimeXmlPrimeXmlPrime
- XmlPrime.SerializationXmlPrime.SerializationXmlPrime.Serialization
- SystemSystemSystem
- System.Collections.GenericSystem.Collections.GenericSystem.Collections.Generic
- System.TextSystem.TextSystem.Text
- System.Text.RegularExpressionsSystem.Text.RegularExpressionsSystem.Text.RegularExpressions
- System.XmlSystem.XmlSystem.Xml
- System.Xml.XPathSystem.Xml.XPathSystem.Xml.XPath