<msxsl:using> Element
Note
In this document it is assumed that the prefix msxsl
is bound to the namespace urn:schemas-microsoft-com:xslt
.Syntax
<msxsl:using namespace? = string />
Attributes
- namespace
Type:string
The namespace to import.
Remarks
Note
This element is provided for compatability with the XslCompiledTransformXslCompiledTransformXslCompiledTransform and XslTransformXslTransformXslTransform classes.
For new development with XmlPrime we recommend using the <msxsl:using><msxsl:using><msxsl:using> element instead.
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 <msxsl:script><msxsl:script><msxsl:script> script block. The following example shows how to import the System.XmlSystem.XmlSystem.Xml namespace:
<msxsl: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:
- SystemSystemSystem
- System.CollectionsSystem.CollectionsSystem.Collections
- System.TextSystem.TextSystem.Text
- System.Text.RegularExpressionsSystem.Text.RegularExpressionsSystem.Text.RegularExpressions
- System.XmlSystem.XmlSystem.Xml
- System.Xml.XPathSystem.Xml.XPathSystem.Xml.XPath
- System.Xml.XslSystem.Xml.XslSystem.Xml.Xsl