Jump to content

DrtyRdr

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by DrtyRdr

  1. Just posting back here for posterity, and just in case someone else is looking to do the same thing.

     

    I was able to get the output needed by using the translate command:

     

    I changed this:

    <xsl:attribute name="invoiceID">
    <xsl:value-of select="PurchaseOrderInvoice/OrderGraph/PartialOrderNumber"/>
    </xsl:attribute>

     

    To this:

    <xsl:attribute name="invoiceID">
    <xsl:value-of select="translate(PurchaseOrderInvoice/OrderGraph/PartialOrderNumber,'-','')"/>

    </xsl:attribute>

     

    And my output went from this invoiceID="668916-0" to this invoiceID="6689160"

     

    Thanks!

  2. XSL is a styling language, its capabilities of actually modifying data are very limited. You might want to look into a programming solution with a server-side programming language, or Javascript if you're on the client side.

    Thank you for the reply. I will have to get with my development team to see if a programming solution is possible. I was hoping to take care of it easily in the XSL. Thanks much.

  3. Hello all,

    Noob here, learning the basics of XSL's and cXML, so please be gentle!

     

    I work with an eprocurement solution which uses XSL to general cXML for posting things like punchout requests, cXML purchase orders and invoices...etc. I am in need of suggestions on how to accomplish the following.

     

    I am using the following attribute in my XSL to pull and display an order number in the resulting cXML invoice. The line I am using is:

     

    <xsl:attribute name="invoiceID">
    <xsl:value-of select="PurchaseOrderInvoice/OrderGraph/PartialOrderNumber"/>
    </xsl:attribute>

     

    This line results in the following cXML line:

    invoiceID="668916-0"

     

    The number listed is the order number generated by the ERP, and the ERP will always include the dash at the end. What I am wanting to do is remove the dash between the 6 and 0, to output the results to just:

    invoiceID="6689160"

     

    Is this possible, and if so, how?

     

    Thanks very much.

     

×
×
  • Create New...