Skip to main content

How to add a prefix for the default namespace to run an action - Knowledgebase / Lasernet / Lasernet Developer FAQs - Formpipe Support Portal

How to add a prefix for the default namespace to run an action

Authors list

You cannot run an action in the XML Transformer for an XPath that has a reference to a default namespace(xmlns not followed by : something). This is a standard issue if you need to XML transform the UBL XML format.

Here is an example of a default namespace:

In this example we would like to create a delete action for the cbc:CopyIndicator document that contains a default namespace ( xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 ) on the root node Invoice.

Since you cannot use an XPath in the XML Transformer Form to select the Invoice node directly, you must enter the Namespaces dialog:

1.  Click XML in the Toolbar. select Namespaces to assign a prefix for the default namespace.

2. In this example we can assign a prefix for urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 with the name def.

3. After assigning a prefix for the default namespace you can add the delete action using the newly created prefix for the Invoice node. 

Type in the prefix(def:) yourself. Then the delete action will work.
Helpful Unhelpful

1 of 1 people found this page helpful