Functions/Templates List

Templates

element()* copy-nodes-by-namespace-uri (param: xs:anyURI* uri) - source

Recursive copy of elements descending the context node elements are copied iff they are in the provided namespace ($uri)

Normalization of XML data, see also: SVN/software/tools/trunk/normalize2.xsl

changed version of the (invalid) original from http://dpawson.co.uk/xsl/sect2/N8321.html#d12364e18

xs:string build-primary-data-from-XML (param: node()+ XMLdata) - source

This template generates a text on the basis of the textual content of the provided $XMLdata. The text serves as primary data and therefore as a reference of the start and end position of elements.

Template called by initial template (matching '/').

copyNodes (param: xs:string source) - source

Template copies child elements of the context node recursively and replaces old IDs by new ones (from $newSegments)

copyAnnotations (param: xs:string level) - source

Copying annotation elements from levels or layers while returning the new segment references.

Returning of the deleted annotation in a separate XSF file.

Functions

xs:boolean bool:twoStringsFormClitic (param: xs:string string1xs:string string2) - source

Testing whether or not two strings ($string1 und $string2) form a clitic together.

xs:boolean bool:self-in-mC (param: self) - source

Tests whether a node (text() or element()) is in a mixed content section

attribute()* attr:return-atts-for-elems-from-namespace (param: xs:anyURI* namespaces) - source

Function for getting names of elements from a specific namespace

xs:integer* int:substring-positions (param: xs:string stringxs:string substring) - source

Returns the position (start and end) of the first occurence of a substring in string

xs:string? string:replace-all (param: xs:string inputStringxs:string+ regexSEQxs:string+ replaceSEQ) - source

This function replaces all instances from the regex sequence (regexSEQ) by the corresponding substitution values (same position in replaceSEQ)

undef:segments2inline (param: element()* segments) - source

Copy of elements into an inline annotation by reference to segments

xs:boolean bool:include-empty-element (param: xs:string* ns-prefix) - source

Testing whether to include an empty element using stylesheet parameter $levels-empty-elements

xs:string string:ID-comform (param: xs:string input-string) - source

A valid ID is returned on the basis of the value of the input-string; necessary changes being made

Returning messages containing stylesheet parameters and their supplied values

Checking primary data identity on the basis of primary data and textual content of XML both without whitespaces

xs:string string:infiltrate-string (param: xs:string input-stringxs:string infiltrator) - source

Insert $infiltrator (e.g. '\s*') into string (after every single char) and escape special regex chars, e.g. input: 'hello.' - output: '\s*h\s*e\s*l\s*l\s*o\s*\.\s*'

string:compare-strings (param: xs:string text-nodexs:string pd-dataxs:string matching-stringxs:integer removed-leading-pd-ws) - source

Compares two strings while ignoring whitespaces; the result is a sequence consisting of (a) the matching substring, and (b) the rest of the $pd-data which does not match

Deriving position information from preceding item of context item in $pd-replaced-positions

xs:string+ string:first-distinct-char (param: xs:string string1xs:string string2xs:integer position) - source

Deriving first distinct char of two unequal strings

xs:string string:escape4regex (param: xs:string input) - source

Function escapes certain chars of an input string by putting '\' in front

undef:ANALYZE-BUGS (param: xs:string terminatexs:integer levelxs:string message) - source

Function receives message strings which are output due to $level and $ANALYZE-BUGS values

xs:string string:int2string (param: xs:integer+ intSEQ) - source
No short description available
xs:integer undef:iterate-non-ws (param: xs:string? stringxs:string? non-wsxs:integer count) - source
No short description available

Combining the segments from both XSF files

xs:string+ string:first-distinct-char (param: xs:string string1xs:string string2xs:integer position) - source

Deriving first distinct char of two unequal strings

element(xsf:segment)* elem:copy-segments-with-new-ID-and-elem-info (param: element(xsf:segment)* segments) - source

Segments get new IDs and are returned; the temporary information (@XSF1ID und @XSF2ID) is being kept; additionally information on elements spanning over this segment is returned

element(xsf:segment)* elem:sort-segments (param: element(xsf:segment)* segments) - source

Sorting segments on the basis of their attributes @start and @end

Checking for primary data identity by comparing the content of the <xsf:primaryData> of the input annotations

Checking for layers from input annotations which have same IDs

element()* elem:return-elements-in-all-layer (param: element()* base-layer-elemselement(xsf:layer)+ ref-layers) - source

Returning of elements which are present in every layer into a common all-layer.

xs:string string:get-id (param: element() self) - source

Getting the string value of the ID of an element which can either be an attribute(*, xs:ID), in case of schema-aware transformation, or @*:id (basic processor), or the generation of an ID by generate-id()

Returning messages containing information on supplied stylesheet parameters.

element()* elem:process-layer (param: element()* layer-contentxs:anyURI ns-to-be-inlinedxs:string root-name-of-layer) - source

Returns the contents of a layer. The @xsf:segment are updated.

element()* elem:segments2inline (param: element(xsf:segment)* segmentsxs:anyURI ns-to-be-inlinedxs:string root-name-of-layerxs:string layer-prefix) - source

Creating an inline annotation on the basis of a segment list

undef:multiple-inline-annotations (param: element()* elems-this-segmentnested-elemsxs:anyURI ns-to-be-inlinedxs:string layer-prefixxs:string root-name-of-layer) - source

Nesting elements with same segment reference by heuristics given by func:sort-elems()

element()* elem:sort-elems-by-nesting (param: element()* elems-same-segxs:string sort-type) - source

Sorting elements which refer to the same segment either by priority of their xsf:level ($sort-type='priority') or by measurement of their inclusion relations ($sort-type='measure').

document-node() doc:inclusion-measures - source

Calculation of inclusion relations of elements

xs:double double:multiply-int-sequence (param: xs:double* sequencexs:double temp-result) - source

Multiplication of all numbers from a sequence.

attribute() attr:avoid-concurrent-IDs (param: attribute() attributexs:string root-name-of-layer) - source

Test for concurrent ID/IDREF/IDREFS information in attributes and escaping by predefined prefix.

element()* elem:sort-segments (param: element()* segments) - source

Sorting of segments by their @start and @end

element(xsf:segment)* elem:copy-segments-with-new-ID (param: element(xsf:segment)* segments) - source

Copying segments and creating new IDs

Returning messages about stylesheet parameters

xs:boolean bool:compare2paramID (param: xs:string? IDxs:string comparation) - source

Comparison of the provided $ID to the ($remove-id|$extract-ID).

undef:inline-annotations (param: element()* segmentsxs:integer ancestor-start-posxs:integer ancestor-end-pos) - source

Copy of elements into an inline annotation by reference to segments

undef:multiple-inline-annotations (param: element()* elems-this-segmentthis-segment) - source

Nesting elements with same segment reference by heuristics given by func:sort-elems()

element()* elem:sort-segments (param: element()* segments) - source

Sorting of segments by their @start and @end

undef:get-nested-elems (param: element()? segment) - source
No short description available
element()* elem:sort-elems-by-nesting (param: element()* elems-same-segxs:string sort-type) - source

Sorting elements which refer to the same segment either by priority of their xsf:level ($sort-type='priority') or by measurement of their inclusion relations ($sort-type='measure').

xs:double double:multiply-int-sequence (param: xs:double* sequencexs:double temp-result) - source

Multiplication of all numbers from a sequence.

undef:overlaps2milestones (param: element(xsf:segment)* segments) - source

Replaces segments including overlapping position information with milestones.

attribute()? attr:get-ID-att (param: element()? node) - source

Getting the corresponding ID-attribute (intended for <xsf:segment> and <milestone>).

document-node() doc:inclusion-measures - source

Calculation of inclusion relations of elements.

element(text)* elem:text-segments - source

Building segments for the textual content of the input XML file.

Returning information on supplied stylesheet parameters.

xs:double double:get-yPos (param: xs:integer segPos) - source

Computing the vertical position of an element (XSF segment) in the element bar overview

elem:slice-primaryData (param: xs:string textxs:integer iterxs:integer start-this-line) - source

For each character in the supplied string ($text) there is a condition whether or not a <tspan>, containing additional information, is output (depends on type of char)