This module provides the functions that control the Web presentation of xqDoc. The logic contained in this module is not specific to any XQuery implementation and is written to the May 2003 XQuery working draft specification. It should also be noted that these functions not only support the real-time presentation of the xqDoc information but are also used for the static offline presentation mode as well. The static offline presentation mode has advantages because access to a native XML database is not needed when viewing the xqDoc information ... it is only needed when generating the offline materials.
build-link
-
view code
- ( $type as xs:string ,
$local as xs:boolean ,
$parms as xs:string* ,
$name as xs:string?) as element()?
Construct a link. Based on the parameters, the link will be built for the static (off-line viewing mode of xqDoc) or the dynamic viewing mode of xqDoc. The parameters will also indicate which link to construct, supply the appropriate paramters for the link, and assign a name for the link.
- Parameters:
- $type - the type of link to construct. The link can be for the xqDoc home page, the module page for a particular module, or for the XQuery code for a specific function.
- $local - indicates whether to build static HTML link for offline viewing or dynamic links for real-time viewing.
- $parms - the parameters associated with the link $type
- $name - the name to assign for the link
- Return:
External Functions that are used by this Function
Module URI | Function Name |
---|
| |
http://www.w3.org/2003/05/xpath-functions | concat |
count |
exists |
index-of |
true |
Internal Functions used by this Function
Internal Functions that invoke this Function
decode-uri
Decode the uri. This routine is needed for some XML databases that have problems with specific characters contained in a document URI. This routine makes the URI more human readable ... by removing the encoding. Currently, the only character encoded is a "/". Other characters could easily be added. However, they would also need to be specified in the xqDoc conversion package (XQDocContext).
- Parameters:
- $uri - the string to be decoded
- Return:
External Functions that are used by this Function
Module URI | Function Name |
---|
| |
http://www.w3.org/2003/05/xpath-functions | replace |
Internal Functions that invoke this Function
get-code-html
-
view code
- ( $module as xs:string ,
$name as xs:string? ,
$local as xs:boolean) as element()
Construct the HTML that will contain the XQuery code for the function in the current module (or the entire module). The code will be presented via a Javascript popup Window from the module. The lack of a $name parameter indicates to construct the HTML for entire module.
- Parameters:
- $module - the uri associated with the current module
- $name - the name associated with the current function contained in the module
- $local - indicates whether to build static HTML link for offline viewing or dynamic links for real-time viewing.
- Return:
- HTML ... the XQuery code for the function
External Functions that are used by this Function
Module URI | Function Name |
---|
| |
http://www.w3.org/2003/05/xpath-functions | doc |
empty |
exists |
External Functions that invoke this Function
Internal Functions used by this Function
get-default-html
-
view code
- ( $local as xs:boolean) as element()
Construct the HTML for the xqDoc home page. This will include the welcome text and the list of modules available in xqDoc.
- Parameters:
- $local - indicates whether to build static HTML link for offline viewing or dynamic links for real-time viewing.
- Return:
External Functions that invoke this Function
Internal Functions used by this Function
get-function-names
-
view code
- ( $module as xs:string) as xs:string*
Construct a list of function names defined in the current module.
- Parameters:
- $module - the uri for the current module
- Return:
- List of function names defined in the current module
External Functions that are used by this Function
Module URI | Function Name |
---|
| |
http://www.w3.org/2003/05/xpath-functions | doc |
exists |
normalize-space |
get-module-html
-
view code
- ( $module as xs:string ,
$local as xs:boolean) as element()
Construct the HTML for a xqDoc module page.
- Parameters:
- $module - the module uri
- $local - indicates whether to build static HTML link for offline viewing or dynamic links for real-time viewing.
- Return:
External Functions that invoke this Function
Internal Functions used by this Function
get-module-uris
Construct a list of module uris contained in xqDoc.
- Return:
- List of module uris contained in xqDoc
Internal Functions that invoke this Function
Module URI | Function Name |
---|
| |
xqdoc/xqdoc-display | build-link |
Internal Variables used by this Function
get-stylesheet
Get the xqDoc presentation stylesheet. This is embedded into the returned XHTML for all of the presentation pages. It is embedded into pages (instead of referencing a link) to keep things simple for the off-line viewing mode.
Internal Functions that invoke this Function
module-uri
Find the module uri for the associated element. This routine is needed since we can't rely soley on base-uri(). Instead, the xqDoc XML URI is contained in the XML of the document (the xqDoc module section).
- Parameters:
- $e - the element (i.e. function or variable) that we want to find the module uri
- Return:
- the module URI associated with the element
Internal Functions that invoke this Function
print-external-functions-invoked
-
view code
- ( $function as element() ,
$local as xs:boolean) as element()*
Construct the information to identify those functions (contained in other modules) that are used by the current function. If that module exists in xqDoc, construct a link to the module and function. If that module does not exist in xqDoc, simply identify the module and function name.
- Parameters:
- $function - the current function
- $local - indicates whether to build static HTML link for offline viewing or dynamic links for real-time viewing.
- Return:
External Functions that are used by this Function
Module URI | Function Name |
---|
| |
http://www.w3.org/2003/05/xpath-functions | count |
distinct-values |
doc |
exists |
Internal Functions used by this Function
Internal Functions that invoke this Function
print-external-functions-invoked-by
-
view code
- ( $function as element() ,
$local as xs:boolean) as element()*
Construct the information to identify those functions (contained in other modules) that use the current function. If that module exists in xqDoc, construct a link to the module and function. If that module does not exist in xqDoc, simply identify the module and function name.
- Parameters:
- $function - the current function
- $local - indicates whether to build static HTML link for offline viewing or dynamic links for real-time viewing.
- Return:
External Functions that are used by this Function
Module URI | Function Name |
---|
| |
http://www.w3.org/2003/05/xpath-functions | collection |
count |
distinct-values |
doc |
exists |
Internal Functions used by this Function
Internal Functions that invoke this Function
Internal Variables used by this Function
print-external-variable-references
-
view code
- ( $variable as element() ,
$local as xs:boolean) as element()*
Construct the information to identify those functions (defined in other modules from the current variable) that used the current variable. If that module exists in xqDoc, construct a link to the module and function. If that module does not exist in xqDoc, simply identify the module and function name.
- Parameters:
- $variable - the current variable
- $local - indicates whether to build static HTML link for offline viewing or dynamic links for real-time viewing.
- Return:
External Functions that are used by this Function
Module URI | Function Name |
---|
| |
http://www.w3.org/2003/05/xpath-functions | collection |
count |
distinct-values |
doc |
exists |
Internal Functions used by this Function
Internal Functions that invoke this Function
Internal Variables used by this Function
print-external-variables-referenced
-
view code
- ( $variable as element() ,
$local as xs:boolean) as element()*
Construct the information to identify those functions (defined in other modules from the current variable) that use the current variable. If that module exists in xqDoc, construct a link to the module and function. If that module does not exist in xqDoc, simply identify the module and function name.
- Parameters:
- $variable - the current variable
- $local - indicates whether to build static HTML link for offline viewing or dynamic links for real-time viewing.
- Return:
External Functions that are used by this Function
Module URI | Function Name |
---|
| |
http://www.w3.org/2003/05/xpath-functions | concat |
count |
distinct-values |
doc |
exists |
Internal Functions used by this Function
Internal Functions that invoke this Function
print-imports
-
view code
- ( $uri as xs:string ,
$local as xs:boolean) as element()*
Construct the high-level xqDoc HTML for any modules imported by the module.
- Parameters:
- $uri - the URI for the module
- $local - indicates whether to build static HTML link for offline viewing or dynamic links for real-time viewing.
- Return:
External Functions that are used by this Function
Module URI | Function Name |
---|
| |
http://www.w3.org/2003/05/xpath-functions | base-uri |
collection |
doc |
exists |
Internal Functions used by this Function
Internal Functions that invoke this Function
Internal Variables used by this Function
print-internal-functions-invoked
-
view code
- ( $function as element() ,
$local as xs:boolean) as element()*
Construct the information to identify those functions (contained in the module for the current function) that are used by the current function. Construct a link to the module and function.
- Parameters:
- $function - the current function
- $local - indicates whether to build static HTML link for offline viewing or dynamic links for real-time viewing.
- Return:
External Functions that are used by this Function
Module URI | Function Name |
---|
| |
http://www.w3.org/2003/05/xpath-functions | count |
distinct-values |
doc |
exists |
Internal Functions used by this Function
Internal Functions that invoke this Function
print-internal-functions-invoked-by
-
view code
- ( $function as element() ,
$local as xs:boolean) as element()*
Construct the information to identify those functions (contained in the module for the current function) that use the current function. Construct a link to the module and function.
- Parameters:
- $function - the current function
- $local - indicates whether to build static HTML link for offline viewing or dynamic links for real-time viewing.
- Return:
External Functions that are used by this Function
Module URI | Function Name |
---|
| |
http://www.w3.org/2003/05/xpath-functions | collection |
count |
distinct-values |
doc |
exists |
Internal Functions used by this Function
Internal Functions that invoke this Function
Internal Variables used by this Function
print-internal-variable-references
-
view code
- ( $variable as element() ,
$local as xs:boolean) as element()*
Construct the information to identify those functions (defined in the module for the current variable) that use the current variable. Construct a link to the module and function.
- Parameters:
- $variable - the current variable
- $local - indicates whether to build static HTML link for offline viewing or dynamic links for real-time viewing.
- Return:
External Functions that are used by this Function
Module URI | Function Name |
---|
| |
http://www.w3.org/2003/05/xpath-functions | collection |
count |
distinct-values |
doc |
exists |
Internal Functions used by this Function
Internal Functions that invoke this Function
Internal Variables used by this Function
print-internal-variables-referenced
-
view code
- ( $variable as element() ,
$local as xs:boolean) as element()*
Construct the information to identify those functions (defined in the module for the current variable) that use the current variable. Construct a link to the module and function.
- Parameters:
- $variable - the current variable
- $local - indicates whether to build static HTML link for offline viewing or dynamic links for real-time viewing.
- Return:
External Functions that are used by this Function
Module URI | Function Name |
---|
| |
http://www.w3.org/2003/05/xpath-functions | concat |
count |
distinct-values |
doc |
exists |
Internal Functions used by this Function
Internal Functions that invoke this Function
print-intro
-
view code
- ( $local as xs:boolean) as element()+
Construct the welcome banner for the xqDoc home page.
- Parameters:
- $local - indicates whether to build static HTML link for offline viewing or dynamic linke for real-time viewing.
- Return:
Internal Functions that invoke this Function
print-method-detail
-
view code
- ( $uri as xs:string ,
$local as xs:boolean) as item()*
Construct the xqDoc HTML method detail for each function defined in the module. The method detail will contain the function signature and all xqDoc comments associated with the function. In addition, cross-reference links will be included for the following:
- Functions (contained in this module) that are used by this function
- Functions (not contained in this module) that are used by this function
- Functions (contained in this module) that use this function
- Functions (not contained in this module) that use this function
- Variables (contained in this module) that are used by this function
- Variables (not contained in this module) that are used by this function
- Parameters:
- $uri - the URI for the module
- $local - indicates whether to build static HTML link for offline viewing or dynamic links for real-time viewing.
- Return:
External Functions that are used by this Function
Module URI | Function Name |
---|
| |
http://www.w3.org/2003/05/xpath-functions | doc |
exists |
false |
normalize-space |
Internal Functions used by this Function
Internal Functions that invoke this Function
print-method-summary
Construct the xqDoc HTML method summary for each function defined in the module. The method summary will contain the function signature and the first sentence of any xqDoc comments associated with the function.
- Parameters:
- $uri - the URI for the module
- Return:
External Functions that are used by this Function
Module URI | Function Name |
---|
| |
http://www.w3.org/2003/05/xpath-functions | concat |
doc |
exists |
normalize-space |
substring-before |
true |
Internal Functions used by this Function
Internal Functions that invoke this Function
print-module
-
view code
- ( $uri as xs:string ,
$local as xs:boolean) as element()*
Construct the high-level xqDoc HTML for the module. This is essentially any introductory xqDoc comments that might be associated with the module.
- Parameters:
- $uri - the URI for the module
- $local - indicates whether to build static HTML link for offline viewing or dynamic links for real-time viewing.
- Return:
External Functions that are used by this Function
Module URI | Function Name |
---|
| |
http://www.w3.org/2003/05/xpath-functions | doc |
exists |
Internal Functions used by this Function
Internal Functions that invoke this Function
print-module-control
-
view code
- ( $uri as xs:string ,
$local as xs:boolean) as item()+
The controller for constructing the xqDoc HTML information for the specified module. The following information for each module will be generated.
- Module introductory information
- Global variables declared in this module
- Modules imported by this module
- Summary information for each function defined in the module
- Detailed information for each function defined in the module
- Parameters:
- $uri - the URI for the module
- $local - indicates whether to build static HTML link for offline viewing or dynamic links for real-time viewing.
- Return:
Internal Functions used by this Function
Internal Functions that invoke this Function
print-module-intro
-
view code
- ( $local as xs:boolean) as element()
Construct the welcome banner for the xqDoc module page.
- Parameters:
- $local - indicates whether to build static HTML link for offline viewing or dynamic links for real-time viewing.
- Return:
Internal Functions used by this Function
Module URI | Function Name |
---|
| |
xqdoc/xqdoc-display | build-link |
Internal Functions that invoke this Function
print-modules
-
view code
- ( $local as xs:boolean) as element()+
Construct the list of modules available to xqDoc for presentation. The list of modules is availalbe on the xqDoc home page.
- Parameters:
- $local - indicates whether to build static HTML link for offline viewing or dynamic links for real-time viewing.
- Return:
External Functions that are used by this Function
Module URI | Function Name |
---|
| |
http://www.w3.org/2003/05/xpath-functions | base-uri |
collection |
exists |
string |
Internal Functions used by this Function
Internal Functions that invoke this Function
Internal Variables used by this Function
print-preserve-newlines
Modify the markup (i.e. newlines) associated with an XQuery function so that it presents cleanly in HTML.
- Parameters:
- $strin - the code associated with an XQuery function
- Return:
- the presentation friendly version of the code
External Functions that are used by this Function
Module URI | Function Name |
---|
| |
http://www.w3.org/2003/05/xpath-functions | tokenize |
Internal Functions that invoke this Function
print-signature
-
view code
- ( $sigs as xs:string* ,
$local as xs:boolean) as item()*
Construct the xqDoc HTML for the function signature.
- Parameters:
- $sigs - the signatures associated with the current function. Although only one signature is allowed for user-defined functions, more than one signature is required to support other 'modules' such as XPath F & O.
- $local - indicates whether to build static HTML link for offline viewing or dynamic links for real-time viewing.
- Return:
- String containing the marked up function signature.
External Functions that are used by this Function
Module URI | Function Name |
---|
| |
http://www.w3.org/2003/05/xpath-functions | count |
normalize-space |
substring-after |
tokenize |
Internal Functions that invoke this Function
print-variables
-
view code
- ( $uri as xs:string ,
$local as xs:boolean) as element()*
Construct the high-level xqDoc HTML for any global variables declared in the module. In addition, cross-reference links will be included for the following:
- Functions (contained in this module) that use this variable
- Functions (not contained in this module) that use this variable
- Parameters:
- $uri - the URI for the module
- $local - indicates whether to build static HTML link for offline viewing or dynamic links for real-time viewing.
- Return:
External Functions that are used by this Function
Module URI | Function Name |
---|
| |
http://www.w3.org/2003/05/xpath-functions | concat |
doc |
exists |
Internal Functions used by this Function
Internal Functions that invoke this Function