Previous Next

DECLARE-NAMESPACE( ) method
Adds a namespace declaration to a tag in the XML document represented by a SAX-writer object.
Return type:
Applies to:
 
Syntax 
DECLARE-NAMESPACE ( namespace-URI [ , prefix ] )
namespace-URI
A CHARACTER or LONGCHAR expression evaluating to the URI of the attribute.
prefix
A CHARACTER or LONGCHAR expression evaluating to the prefix of the namespace.
Call this method to add a namespace declaration to a start tag. You can only call this method directly following a call to START-ELEMENT, WRITE-EMPTY-ELEMENT, INSERT-ATTRIBUTE, or DECLARE-NAMESPACE method. That is, you can only call this method when the WRITE-STATUS attribute is SAX-WRITE-TAG. The WRITE-STATUS attribute remains SAX-WRITE-TAG after this method call.
Regardless of the value of the STRICT attribute, this method fails if you do not call it after one of the valid methods listed above.
If you use an empty string ("") or the Unknown value (?) for the prefix, or you omit the prefix, then the method declares the default namespace: xmlns="namespace-URI".

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.