xml special char replacement.

 <?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:output method="xml" indent="yes"/>


  <!-- Define the characters to be replaced and their replacements -->

  <xsl:variable name="charsToReplace" select="'駵'"/>

  <xsl:variable name="replacementChars" select="' '"/>


  <!-- Identity transform template for copying elements and attributes -->

  <xsl:template match="@*|node()">

    <xsl:copy>

      <xsl:apply-templates select="@*|node()"/>

    </xsl:copy>

  </xsl:template>


  <!-- Template for text nodes to escape special characters -->

  <xsl:template match="text()">

    <xsl:value-of select="translate(., $charsToReplace, $replacementChars)"/>

  </xsl:template>

</xsl:stylesheet>


-----------

<?xml version="1.0" encoding="utf-8"?>

<Envelope xmlns="http://schemas.biztalkfactory.com/BizTalk/2011/envelope/V1">

<Action xmlns=""/>

<StartProcessingDate xmlns="">2024-08-14T13:52:52</StartProcessingDate>

<BatchId xmlns="">D64E17F7-D874-4107-A7B4-F926462AB99D</BatchId>

<TechnicalId xmlns=""/>

<FunctionalId xmlns=""/>

<InputHalfFlow xmlns=""/>

<OutputHalfFlow xmlns=""/>

<RoutingCode xmlns="">NAV_FM_OUT_PROD_RNIM</RoutingCode>

<TransactionTypeCode xmlns="">SALES_ORDER</TransactionTypeCode>

<TestingFlag xmlns=""/>

<Extra xmlns=""/>

<Payload xmlns="">

<ns0:SalesHeaders xmlns:ns0="http://schemas.royalcanin.com/BizTalk/2012/Pub/SalesOrderExport">>

<SalesHeader>

<ns0:DocumentNo>SRT2102810</ns0:DocumentNo>

<ns0:YourReference>fg_2908_001</ns0:YourReference>

<ns0:ExternalDocumentNo/>

<ns0:EDISell-toCustomerNo/>

<ns0:Sell-toCustomerNo>2455665</ns0:Sell-toCustomerNo>

<ns0:Sell-toCustomerName>Maxi ZOO Strasbourg</ns0:Sell-toCustomerName>

<ns0:Sell-toAddress>38 Rue Charles P駵</ns0:Sell-toAddress>



-----


<?xml version="1.0" encoding="UTF-8"?>

<Envelope xmlns="http://schemas.biztalkfactory.com/BizTalk/2011/envelope/V1">

   <Action xmlns=""/>

   <StartProcessingDate xmlns="">2024-08-14T13:52:52</StartProcessingDate>

   <BatchId xmlns="">D64E17F7-D874-4107-A7B4-F926462AB99D</BatchId>

   <TechnicalId xmlns=""/>

   <FunctionalId xmlns=""/>

   <InputHalfFlow xmlns=""/>

   <OutputHalfFlow xmlns=""/>

   <RoutingCode xmlns="">NAV_FM_OUT_PROD_RNIM</RoutingCode>

   <TransactionTypeCode xmlns="">SALES_ORDER</TransactionTypeCode>

   <TestingFlag xmlns=""/>

   <Extra xmlns=""/>

   <Payload xmlns="">

      <ns0:SalesHeaders xmlns:ns0="http://schemas.royalcanin.com/BizTalk/2012/Pub/SalesOrderExport">&gt;

<SalesHeader>

            <ns0:DocumentNo>SRT2102810</ns0:DocumentNo>

            <ns0:YourReference>fg_2908_001</ns0:YourReference>

            <ns0:ExternalDocumentNo/>

            <ns0:EDISell-toCustomerNo/>

            <ns0:Sell-toCustomerNo>2455665</ns0:Sell-toCustomerNo>

            <ns0:Sell-toCustomerName>Maxi ZOO Strasbourg</ns0:Sell-toCustomerName>

            <ns0:Sell-toAddress>38 Rue Charles P </ns0:Sell-toAddress>


----------

<xsl:stylesheet version="1.0" 

xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>

<xsl:strip-space elements="*"/>


<xsl:param name="charset" select="'駵'" />


<xsl:template match="@*|node()">

    <xsl:copy>

        <xsl:apply-templates select="@*|node()"/>

    </xsl:copy>

</xsl:template>


<xsl:template match="text()">

    <xsl:value-of select="translate(., translate(., $charset, ''), '')"/>

</xsl:template>


</xsl:stylesheet>

Popular posts from this blog

pss book : శ్రీకృష్ణుడు దేవుడా, భగవంతుడా completed , second review needed. 26th April 2024

pss book: గురు ప్రార్థనామంజరి . completed 21st july 2024

pss book: కధల జ్ఞానము read review pending. 25th june 2024