Elements for Namespaces
Define XML namespaces.
Syntax
NAMESPACES count="number"
NS id="number" <prefix="name">
Elements
- NAMESPACES count="number" XMLV2
Only
-
is an optional element
that contains one or more NS elements for defining XML namespaces. For example, <NAMESPACES
count="2">
.
XMLMap namespace elements
enable you to import an XML document with like-named elements that
are qualified with XML namespaces. In addition, XMLMap namespace elements
maintain XML namespaces from the imported XML document to export an
XML document from the SAS data set.
An XML namespace is
a W3C specification that distinguishes element and attribute names
by qualifying them with Uniform Resource Identifiers (URIs). For example,
if an XML document contains a CUSTOMER element and a PRODUCT element,
and both elements contain a nested ID element, XML namespaces make
each nested ID element unique.
- count="number"
-
specifies the number
of defined XML namespaces.
Requirement:The count= attribute is required. The specified value
must match the total number of NS elements.
- NS id="number" <prefix="name"> XMLV2
Only
-
is an optional element
that defines an XML namespace by referencing a unique URI. The URI
is a string of characters that identifies a resource on the Internet.
The URI is treated by an XML parser as simply a string. Specifying
the URI does not require that it be used to retrieve information.
The most common URI is the Uniform Resource Locator (URL), which identifies
an Internet domain address. The use of URIs as namespace names must
follow the same rules as the W3C specification for XML namespaces. For example, <NS
id="1" prefix="freq"> http://www.hurricanefrequency.com </NS>
.
Note: It is recommended that you
do not use non-escaped characters in a URI.
- id="number"
-
specifies an identification
number for the XML namespace.
Requirements:The id= attribute is required.
In the variable definition, the identification number
must be included in the location path preceding the element that is
being defined. See PATH syntax="type".
- prefix="name"
-
specifies a qualified
name that is associated with the referenced URI. The prefix is used
with each element or attribute to indicate to which XML namespace
it belongs. Prefix names must follow the same rules as the W3C specification
for element names.
Requirements:The referenced URI must be unique.
The total number of NS elements must match the specified
value in the NAMESPACES count= attribute.
Tip:It is recommended that you do not use non-escaped characters
in a URI.
Copyright © SAS Institute Inc. All rights reserved.