davidmhollis 0 Newbie Poster

I am trying to use <xsl:if test= "node/text() = '.' to copy a node from a destination xml document to the source xml document, but only if there is a match between the text() nodes being checked from each document. My if test= "node/text() statement is always returning a match and copying the node.

Here's my code:

<xsl:if test="/tns:InvoiceNotification/ssdh:DocumentHeader/ssdh:DocumentInformation
   /ssdh:Creation/ssdh:DocumentIdentification/ssdh:Identifier/text() = '.'  =       

   document('xml2  .xml')/tns:InvoiceNotification/ssdh:DocumentHeader/ssdh:DocumentInformation/
      ssdh:Creation/ssdh:DocumentIdentification/ssdh:Identifier/text() 
    = '.' ">

   <xsl:copy-of select="document('xml2   .xml')/tns:InvoiceNotification/tns:Invoice/tns:InvoiceLineItem"/>

   </xsl:if>

The node is copied to the source document every time... even when the Identifier node values don't match.

Is there a syntax issue with my text() = '.' match that needs to be changed?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.