1

My XML

<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet type="text/xsl" href="Results.xsl"?>
  <TestCase>
    <Details>

    <platform>Windows 7-Firefox\prod</platform>

    </Details>
  </TestCase>

I need to retrieve Windows 7 Firefox prod as individual strings im able to retrieve all the strings except "Firefox", please help to to retrieve it

My XSL

<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Edited by XMLSpy® -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
  <html>
  <body>


       <OS><xsl:value-of select="substring-before(TestCase/Details/platform, '-')"/></OS>
<inst><xsl:value-of select="substring-after(TestCase/Details/platform, '\')"/></inst>

<brow><xsl:value-of select="substring-before(substring-after(TestCase/Details/platform, '\'),'-')"> </brow>

  </body>
  </html>
</xsl:template>
</xsl:stylesheet>

1 Answer 1

1

You have this backwards (and missing a closing!):

<brow><xsl:value-of select="substring-before(substring-after(TestCase/Details/platform, '\'),'-')"> </brow>

It should be:

<brow>
    <xsl:value-of select="substring-before(substring-after(TestCase/Details/platform, '-'),'\')"/> 
</brow>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.