Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The library providing the methods is injected into the XSLT engine at runtime as an extension object using the namespace “http://link/xslt“, so in order to call the library methods from an XSLT script, it needs to reference this namespace and define a namespace prefix for it.

NOTE: The built-in XSLT functions used to “live” in the LinkProxy assembly, which is why the Xml namespace referring to them used to be "http://link.rest.proxy/xslt". That namespace still works in Link. Going forward we recommend that you use the new namespace, but nothing will break if you have maps that still use the old one. The exact same helper methods are registered with both namespaces.

Here is an example XSLT calling every available method:

...

These are the methods for doing lookups in conversion tables.

ConversionLookup[LookupType]Value(string conversiontablename, string returncolumn, string searchcolumn[N], string searchvalue[N],

...

…, string suppressExceptions)

This is a template for the methods used for performing a conversion table lookup.

...

Using the method ConversionLookupPartnerOutValue() will look for partner specific values for the outgoing partner in the conversion table indicated in the method call, falling back to global values if no value can be matched for the specific partner.

Here is a description of the functionality associated with each of the input parameters.

string conversiontablename

This is the name of the conversion table to perform the lookup in.

string returncolumn

This is the name of the column in the conversion table indicated in the method call, falling back to global values if no value can be matched for the specific partner.

Here is a description of the functionality associated with each of the input parameters.

string conversiontablename

This is the name of the conversion table to perform the lookup in.

string returncolumn

This is the name of the column in the conversion table that you want the value returned from.

string searchcolumn[N]

This is the name of the Nth column you want to match on in your conversion table lookup.

string searchvalue[N]

This is the value you want to match the above column on.

Each of the three lookup types support between 1 and 5 pairs of search columns and search valuesthat you want the value returned from.

string searchcolumn[N]

This is the name of the Nth column you want to match on in your conversion table lookup.

string searchvalue[N]

This is the value you want to match the above column on.

Each of the three lookup types support between 1 and 5 pairs of search columns and search values.

string suppressExceptions

This parameter is optional. If it is not used in a call, the lookup method will never fail, it will simply return an empty string if anything goes wrong, such as the conversion table not existing, or one of the lookup values being blank. If you explicitly want the map to fail in one of those situations, add the parameter to the end of the call as false() or ‘false’.

While the parameter is logically a boolean value, it is implemented as a string to make it “play nice” with XSLT.

Link settings

Should you have a need for it, you can get the value of any Link setting on the system.

...

These are the methods used for error handling.

RaiseError(string message,

...

string retryAllowed)

This method is used for making a document intentionally go into Failed status in Link.

...

The retryAllowed parameter should always be set to false() or ‘false’ except in very specific cases. Any error that stems from faulty input data will not be resolved by trying to map the faulty data again. While the parameter is logically a boolean value, it is implemented as a string to make it “play nice” with XSLT.

RaiseError(string message, string errorCode,

...

string retryAllowed)

This method is the same as above, but allows you to register the error with a specific error code. If you have a known error scenario that you know a specific department needs to take care of, you can register the error code in Link and assign a specific stakeholder to it. Then any time a document fails with that specific error code, the stakeholder will be notified.

RaiseError(string message, string errorCode, string documentStatus,

...

string retryAllowed)

This method is the same as above, but allows you to set a specific document status rather than defaulting to “Failed”.

...