How Do I Add a Prefix for the Default Namespace to Run an Action?
    • 18 Jun 2024
    • 1 Minute to read
    • Contributors
    • PDF

    How Do I Add a Prefix for the Default Namespace to Run an Action?

    • PDF

    Article summary

    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.

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

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

    Note

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


    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.