Jump to content

ttigg

Members
  • Posts

    1
  • Joined

  • Last visited

ttigg's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Hi folks, Would love to get some assistance with some basic XSLT coding for a template/choose or transform. I have the following XSLT coding which is used to essentially transform (replace) the subject line of an email which is generated by the system. This small section of text allows me to put in the company name to be used in the "Value of select" and this I can kind of follow. XSLT Template/Code <xsl:template match="@* | node()"> <xsl:copy> <xsl:apply-templates select="@* | node()"/> </xsl:copy> </xsl:template> <xsl:template match="//*[local-name() = 'ReportHeader']/*[local-name() = 'Note']"> <Note> <xsl:attribute name="author">email</xsl:attribute> <xsl:attribute name="entryDateTime"><xsl:value-of select="./@entryDateTime"/></xsl:attribute> <xsl:attribute name="languageID">en-US</xsl:attribute> <xsl:attribute name="status">Open</xsl:attribute> <xsl:attribute name="type">SubjectLine</xsl:attribute> <xsl:attribute name="use">External</xsl:attribute> <xsl:value-of select="concat('Company 1000 - ',.)"/> </Note> </xsl:template> This is the section of the XML that the above template is modifying <Note author="user id" entryDateTime="2018-02-15T22:46:13Z" languageID="en-US" status="Open" type="SubjectLine" use="External">Acknowledgement for 219-00</Note> When testing the output it successfully changes the above to the following <Note author="email" entryDateTime="2018-02-15T22:46:13Z" languageID="en-US" status="Open" type="SubjectLine" use="External">Company 1000 - Acknowledgement for 219-00</Note> (This is the section of the XML code that refers to the "Report Header" and has the accounting entity in the document ID) <ReportHeader> <DocumentID> <ID accountingEntity="1000" variationID="1012">Acknowledgement_219-00</ID> </DocumentID> In some instances we have multiple accounting entities and what I would love to be able to do is have some XSLT code to "choose" between the various Accounting Entities and apply the above template (with different names for each accounting entities).Or at the min is there a way of saying when accounting entity = value choose "template a" which for example would be Company 1000 or choose "template b" and the value would be Company 2000 (for example) What would be the best way to edit/write this to be able to have, essentially, a different Company name in the subject line that corresponds to the relative Accounting Entity ID? Thanks in advance, Steve
×
×
  • Create New...