This document is obsolete for releases after v. 3.0.8928.448.
Link's XSLT handling provides a set of methods which can be called from within XSLT. The methods give access to various data points from Link related to the document, partners and interchanges involved in the current flow, as well as providing an interface for performing conversion table lookups.
...
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="UTF-16"?> <xsl:stylesheet xmlns:LinkProxy="http://link.rest.proxy/xslt" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl s0 LinkProxy" version="1.0" xmlns:s0="http://XsltProxyTest.Input" xmlns:ns0="http://XsltProxyTest.Output"> <xsl:output omit-xml-declaration="yes" method="xml" version="1.0"/> <xsl:template match="/"> <xsl:apply-templates select="/s0:Root"/> </xsl:template> <xsl:template match="/s0:Root"> <ns0:Root> <Document> <DocumentType> <xsl:value-of select="LinkProxy:GetDocumentTypeName()"/> </DocumentType> <MessageNumberIn> <xsl:value-of select="LinkProxy:GetDocumentMessageNumberIn()"/> </MessageNumberIn> <MessageNumberOut> <xsl:value-of select="LinkProxy:GetDocumentMessageNumberOut()"/> </MessageNumberOut> <DocumentNumber> <xsl:value-of select="LinkProxy:GetDocumentNumber()"/> </DocumentNumber> </Document> <DocumentConfigIn> <Format> <xsl:value-of select="LinkProxy:GetDocumentFormatIn()"/> </Format> <Variant> <xsl:value-of select="LinkProxy:GetDocumentVariantIn()"/> </Variant> <Version> <xsl:value-of select="LinkProxy:GetDocumentVariantVersionIn()"/> </Version> </DocumentConfigIn> <DocumentConfigOut> <Format> <xsl:value-of select="LinkProxy:GetDocumentFormatOut()"/> </Format> <Variant> <xsl:value-of select="LinkProxy:GetDocumentVariantOut()"/> </Variant> <Version> <xsl:value-of select="LinkProxy:GetDocumentVariantVersionOut()"/> </Version> </DocumentConfigOut> <Distribution> <ConfigurationKeys> <UNBOverride> <xsl:value-of select="LinkProxy:LookupDistributionConfigurationKey('UNBOverride')"/> </UNBOverride> </ConfigurationKeys> </Distribution> <InterchangeIn> <InterchangeNumber> <xsl:value-of select="LinkProxy:GetInterchangeInNumber()"/> </InterchangeNumber> <InterchangeGuid> <xsl:value-of select="LinkProxy:GetInterchangeInGuidGetInterchangeInInterchangeGuid()"/> </InterchangeGuid> <TransmissionId> <xsl:value-of select="LinkProxy:GetInterchangeInTransmissionId()"/> </TransmissionId> <DisplayAddress> <xsl:value-of select="LinkProxy:GetInterchangeInDisplayAddress()"/> </DisplayAddress> <PortName> <xsl:value-of select="LinkProxy:GetInterchangeInPortName()"/> </PortName> <FormatType> <xsl:value-of select="LinkProxy:GetInterchangeInFormatType()"/> </FormatType> </InterchangeIn> <InterchangeOut> <InterchangeNumber> <xsl:value-of select="LinkProxy:GetInterchangeOutNumber()"/> </InterchangeNumber> <InterchangeGuid> <xsl:value-of select="LinkProxy:GetInterchangeOutGuidGetInterchangeOutInterchangeGuid()"/> </InterchangeGuid> <TransmissionId> <xsl:value-of select="LinkProxy:GetInterchangeOutTransmissionId()"/> </TransmissionId> <DisplayAddress> <xsl:value-of select="LinkProxy:GetInterchangeOutDisplayAddress()"/> </DisplayAddress> <PortName> <xsl:value-of select="LinkProxy:GetInterchangeOutPortName()"/> </PortName> <FormatType> <xsl:value-of select="LinkProxy:GetInterchangeOutFormatType()"/> </FormatType> </InterchangeOut> <PartnerIn> <Name> <xsl:value-of select="LinkProxy:GetPartnerInName()"/> </Name> <PartnerKey> <xsl:value-of select="LinkProxy:GetPartnerInPartnerKey()"/> </PartnerKey> <Comment> <xsl:value-of select="LinkProxy:GetPartnerInComment()"/> </Comment> <IsInternal> <xsl:value-of select="LinkProxy:GetPartnerInIsInternal()"/> </IsInternal> <IsDeleted> <xsl:value-of select="LinkProxy:GetPartnerInIsDeleted()"/> </IsDeleted> <MainId> <xsl:value-of select="LinkProxy:GetPartnerInMainId()"/> </MainId> <GLN> <xsl:value-of select="LinkProxy:LookupPartnerInIdByKey('GLN')"/> </GLN> <VendorNumber> <xsl:value-of select="LinkProxy:LookupPartnerInConfigurationKey('VendorNumber')"/> </VendorNumber> </PartnerIn> <PartnerOut> <Name> <xsl:value-of select="LinkProxy:GetPartnerOutName()"/> </Name> <PartnerKey> <xsl:value-of select="LinkProxy:GetPartnerOutPartnerKey()"/> </PartnerKey> <Comment> <xsl:value-of select="LinkProxy:GetPartnerOutComment()"/> </Comment> <IsInternal> <xsl:value-of select="LinkProxy:GetPartnerOutIsInternal()"/> </IsInternal> <IsDeleted> <xsl:value-of select="LinkProxy:GetPartnerOutIsDeleted()"/> </IsDeleted> <MainId> <xsl:value-of select="LinkProxy:GetPartnerOutMainId()"/> </MainId> <CVR> <xsl:value-of select="LinkProxy:LookupPartnerOutIdByKey('CVR')"/> </CVR> <CustomerNumber> <xsl:value-of select="LinkProxy:LookupPartnerOutConfigurationKey('CustomerNumber')"/> </CustomerNumber> </PartnerOut> <ConversionTables> <Lookup1> <xsl:value-of select="LinkProxy:ConversionLookupGlobalValue('Table1', 'LookupColumn1', 'Column1', 'Column1Value')"/> </Lookup1> <Lookup2> <xsl:value-of select="LinkProxy:ConversionLookupPartnerInValue('Table2', 'LookupColumn2', 'Column1', 'Column1Value', 'Column2', 'Column2Value')"/> </Lookup2> <Lookup3> <xsl:value-of select="LinkProxy:ConversionLookupPartnerOutValue('Table3', 'LookupColumn3', 'Column1', 'Column1Value', 'Column2', 'Column2Value', 'Column3', 'Column3Value')"/> </Lookup3> </ConversionTables> <LinkSettings> <Setting1> <xsl:value-of select="LinkProxy:GetSettingValue('Setting1')"/> </Setting1> </LinkSettings> <ErrorHandling> <FailDocument> <xsl:value-of select="LinkProxy:RaiseError('No lines found in order.', false())"/> </FailDocument> <FailDocumentWithErrorCode> <xsl:value-of select="LinkProxy:RaiseError('No lines found in order.', 'RT62W', false())"/> </FailDocumentWithErrorCode> <IgnoreDocument> <xsl:value-of select="LinkProxy:RaiseError('No lines found in order.', 'RT62W', 'Ignored', false())"/> </IgnoreDocument> </ErrorHandling> <ContextProperties> <TestProperty> <xsl:value-of select="LinkProxy:GetContextPropertyValue('NoProperty', 'http://schemas.bizbrains.com/properties/test')"/> </TestProperty> </ContextProperties> </ns0:Root> </xsl:template> </xsl:stylesheet> |
Info |
---|
The same example is available in the Visual Studio project template where it’s possible to debug into the XSLT. |
...
InterchangeNumber is an internal Link property. It is primarily used for assigning a unique ID to a document batch.
...
GetInterchangeInInterchangeGuid() /
...
GetInterchangeOutInterchangeGuid()
InterchangeGuid is an internal Link unique identifier assigned to each ingoing or outgoing interchange.
...