URI

This document describes the class URI of the JScript API. It implements some auxiliary functions that are useful for processing URIs.


Instantiating

This constructor has one parameter: the URI as a string.

Example

var myURI = new
URI("http://mypc.mycompany.com/tamino/myDB"); var myURI = new
URI("mydoctype/head.xml");

Methods

toString

Name toString()
Result Type String
Example  
Description Returns the URI argument as a string.

isAbsolute

Name isAbsolute()
Result Type String
Example  
Description Returns true if the URI argument is an absolute URI, i.e., it contains the name of a protocol, otherwise false.

rebase

Name rebase(URI)
Result Type String
Example  
Description Takes the URI and a base parameter URI and returns a rebased URI. This method conforms to the URI rebasing algorithm documented in IETF RFC 2396.

extractURI

Name extractURI(elementNode, attribute)
Result Type String
Example  
Description Extracts an absolute URI from the attribute within the element node, taking the xml:base information into account. The document xml:base is the URI.

getXMLBase

Name getXMLBase(elementNode)
Result Type String
Example  
Description Calculates the xml:base value for this node in its document context. The document xml:base is the URI.

truncateAtHash

Name truncateAtHash()
Result Type String
Example  
Description Returns the URI argument truncated before the first occurrence of "#", if any.