2 Replies Latest reply on Feb 7, 2011 4:49 PM by ilssac

    XSLT Transformation select parent text without child text.

    ilssac Level 5

      With a fragement of XML something like this:

       

      XmlNamegedcom
      XmlNsPrefix
      XmlNsURI
      XmlText
      XmlComment
      XmlAttributes
      XmlChildren
      xml element
      XmlNameI001
      XmlNsPrefix
      XmlNsURI
      XmlText
      XmlComment
      XmlAttributes
      XmlChildren
      xml element
      XmlNameNAME
      XmlNsPrefix
      XmlNsURI
      XmlTextIan Lee /SKINNER/
      XmlComment
      XmlAttributes
      XmlChildren
      xml element
      XmlNameSOUR
      XmlNsPrefix
      XmlNsURI
      XmlText@S01891@
      XmlComment
      XmlAttributes
      XmlChildren

       

      How would I select the NAME.XmlText value WITHOUT selecting the NAME.SOUR.XmlText value?

       

      This line in an xslt string produces the output "Ian Lee /SKINNER/@S01891@" Concatenating the NAME.XmlText and NAME.SOUR.XmlText values.

      <xsl:value-of select="/gedcom/I001/NAME"/>