SQF reference

XSM-Referenz

Oxygen Content Model

Dynamic Content Model

Global declarations

In this reference, the following terms being unknown or having another meaning within XSLT/XPath are used. The following table contains the declarations of these terms:

Source document

The source document is the document which shall be manipulated per XSM process. It must be a XML well-formed document.

Manipulator sheet

The manipulator sheet defines the manipulations which shall be performed in the source document. It must correspond to the XSM schema documented below.

Manipulation instruction

There are three types of manipulation instructions: delete, replace and add. A manipulator sheet consists of one or more manipulation instructions.

Elements

<xsm:add>

Manipulation instruction: adds nodes to the source document starting from the node indicated in @node.

The nodes indicated in <xsm:content> are added as child, attribute and sibling nodes to each context node indicated in @node. The axis attribute determines on which axis the nodes are added starting from the context node.

The node set indicated in @node must not contain any attributes.

The adding is done by means of string operations. After the addition, the manipulated source document must comply with the standards of well-formed XML.

Parent elements

Child elements

Attributes

@end-position

Description

Tbd.

Use

optional

Value

xs:integer

@node

Description

Indicates the nodes which shall serve as context nodes in order to add nodes to the source document.

Use

required

Value

xs:string

An absolute XPath expression. At the moment, only XPath 1.0 is supported.

@position

Description

Indicates the axis on which the added nodes are inserted into the source document. The axis starts from the context node which is determined in @node.

Use

required

Value

  • attribute

    The nodes to be added are attributes or namespace nodes and they are also to be added to the context node as attributes/namespaces.

  • @

    Short notation for "attribute".

  • first-child

    The nodes to be added are inserted before the first child node of the context node. If there is no child node, they are inserted as child nodes.

  • last-child

    The nodes to be added are inserted after the last child node of the context node. If there is no child node, they are inserted as child nodes.

  • before

    The nodes to be added are inserted directly before the context node.

  • after

    The nodes to be added are inserted directly after the context node.

@start-position

Description

Tbd.

Use

optional

Value

xs:integer

Content model

Oxygen Content Model

Dynamic Content Model

Content model add

<xsm:content>

Defines the nodes to be inserted into the source document for the manipulation instructions <xsm:add> and <xsm:replace>.

The <xsm:content> element may contain any elements and/or attributes. However, depending on the application, there may be restrictions by the manipulation instruction (e.g. that the element may only have attributes or only child nodes).

Parent elements

Content model

Oxygen Content Model

Dynamic Content Model

Content model content

<xsm:delete>

Manipulation instruction: deletes the nodes indicated in @node.

Parent elements

Attributes

@end-position

Description

Tbd.

Use

optional

Value

xs:integer

@node

Description

Indicates the nodes which shall be deleted.

Use

required

Value

xs:string

An absolute XPath expression. At the moment, only XPath 1.0 is supported.

@start-position

Description

Tbd.

Use

optional

Value

xs:integer

Content model

Oxygen Content Model

Dynamic Content Model

Content model delete

<xsm:manipulator>

The root element of the manipulator sheet.

The element contains any number of manipulation instructions.

Attributes

@document

Description

Indicates the source document which shall be manipulated. If no document is indicated, the source document must be passed on to the XSM processor during the call.

Use

optional

Value

xs:anyURI

The value must be an URI to the document. Relative paths reference to the document starting from the manipulator sheet.

Content model

Oxygen Content Model

Dynamic Content Model

Content model manipulator

<xsm:replace>

Manipulation instruction: replaces the nodes indicated in @node by the child/attribute nodes of the <xsm:content> element.

If the nodes indicated in @node are attribute nodes, they are replaced by the attributes of the <xsm:content> element. Otherwise, by the child nodes of the <xsm:content> element.

The node set indicated in @node must not be a mixture of attributes and non-attributes.

The replacing is done by means of string operations. After the replacement, the manipulated source document must comply with the standards of well-formed XML.

Parent elements

Child elements

Attributes

@end-position

Description

Tbd.

Use

optional

Value

xs:integer

@node

Description

Indicates the nodes which shall be replaced.

Use

required

Value

xs:string

An absolute XPath expression. At the moment, only XPath 1.0 is supported.

@start-position

Description

Tbd.

Use

optional

Value

xs:integer

Content model

Oxygen Content Model

Dynamic Content Model

Content model replace

© Copyright 2014-2018 Nico Kutscherauer (last update 2018-07-17)

ImprintPrivacy PolicyContactSitemap