owenslouse
New Member
Here's my problem. I am building a web app that submits xml data to a govt application that returns xml data back that I then parse via xslt into html for viewing. The problem is that the returned xml has 2 (two) blank lines before the declaration \[code\]<?xml version='1.0' standalone='yes'?>\[/code\]Well xslt doesn't like that and won't parse the xml into html. I know this is the problem because if I manually remove the 2 (two) blank lines via an editing program like notepad, the transformation works perfectly. I have no control over how the returned xml data is formatted so I need to find a way to first remove those 2 (two) blank lines before continuing the parsing.So here's my xml (imagine 2 blank lines at the beginning):\[code\]<?xml version='1.0' standalone='yes'?><FHAENTITYDATA FHAVersionID = '1.0'> <PROCESSSTATUS><ProcessStatusCode>Success</ProcessStatusCode><ProcessStatusMessage sCode = '1'>Returned 1 zip code record(s)</ProcessStatusMessage></PROCESSSTATUS> </FHAENTITYDATA>\[/code\]And here's my xsl:\[code\]<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/"><html><head><link rel="stylesheet" href="http://stackoverflow.com/questions/css/fhac.css" type="text/css"/></head><body style="font-family:verdana;"><div id="content"><div id="fieldset"><xsl:for-each select="//ProcessStatusCode"> <tr><td><b><xsl:value-of select="."/></b></td></tr></xsl:for-each><xsl:for-each select="//ProcessStatusMessage"> <tr><td><b><xsl:value-of select="."/></b></td></tr></xsl:for-each></table></div></div></body></html></xsl:template></xsl:stylesheet>\[/code\]My question is, is there any way to remove those leading lines before or during the xslt?