knit

Langue: en

Version: 112057 (mandriva - 01/05/08)

Section: 1 (Commandes utilisateur)

NAME

knit - LT NSL program for expanding hyperlinks in XML documents.

SYNOPSIS

usage: knit [-1] [-r name=value,...] [-i name=value,...] [input-file]

DESCRIPTION

The material below may be out of date: consult LT XML documentation please.

It is used to implement hyperlinking of elements in XML or nSGML documents as per the XML-LINK Linking specification. Hyperlinking means the inclusion of content from one or more 'included' documents into another 'master' document.

Elements which have an XML-LINK="simple" attribute are inspected, and if they have attributes values which match one of the attr-specs given by the -r or -i options, they are replaced by the resource specified by the HREF attribute, which must be of the form <url>#ID(<name>)[..ID(<name>)] The -r option means replace the whole element, -i means insert as the content of the element.

HREF attribute values of the form <url>#ID(<name>) refer to the element in the 'included' file referred to by the <url> with the ID equal to <name>. HREF attribute values of the form <url>#ID(<name1>)..ID(<name2>) refers to the range of elements in the 'included' file referred to by the <url>, between the element with the ID equal to <name1> and the element with ID equal to <name2>, inclusive. In each 'included' file, there must be an attribute of type ID defined for each element which is wanted to be hyperlinked.

DESCRIPTION: Input/Output

Description of the input/output files involved in this program.
Input ==> An nSGML/XML file : [<filename> or stdin]
Output ==> An nSGML/XML file: [stdout]

OPTIONS

-r <attr-spec>
Attr-spec is a comma separated list of attribute_name=attribute_value pairs. Any element in the input document whose attributes match this set of attribute values is replaced by the content of the element(s) pointed to by the HREF attribute on the same element. The default value is

 -r show=replace,actuate=auto
-i <attr-spec>
Attr-spec is a comma separated list of attribute_name=attribute_value pairs. Any element in the input document whose attributes match this set of attribute values has its content replaced by the content of the element(s) pointed to by the HREF attribute on the same element. The default value is

 -i show=embed,actuate=auto}.

Attr-specs are of the form name=value,name=value,... Quoting should be allowed in them but isn't. Both the 'included' and the 'master' documents can be either XML or nSGML format files.

SEE ALSO

ltxml(1), mknsg(1), sggrep(1), sgrpg(1)

AUTHOR

Henry Thompson (ht@cogsci.ed.ac.uk)
David McKelvie (dmck@cogsci.ed.ac.uk)

Language Technology Group, Human Communication Research Centre, Edinburgh University,
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND
Tel:(44) 131 650-4630
Fax:(44) 131 650-4587 email: dmck@cogsci.ed.ac.uk

Comments, suggestions, and bug reports are always welcome.