Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Vexing problem processing a list of error messages

From: "hoosie" <hoosiemama@-----.--->
To: NULL
Date: 10/5/2006 12:06:00 PM

Joe Fawcett wrote:
> What a terrible XML representation...

Thanks Joe, with your help I'm making some progress.  It truly is an
irritating representation, the list should have been split under two
nodes in the first place.

I am having two strange problems though right now (I am using Cooktop
to test this).  First is that the template is returning the opposite of
what I expect.  When I run the code below my result is all of the A:
text, not the MG: text which is what I thought I was matching.

Secondly, If I try to put a second template below this one, my output
is blank.  Is there a limit on how many templates can use which nodes?

Thanks again, Ian

With input:

<?xml version="1.0" encoding="utf-8"?>
<message>
      <text>A:SOMEERROR</text>
      <text>A:SOMEOTHER</text>
      <text>MG:ANOTHER</text>
      <text>A:ANDANOTHER</text>
</message>

and XSL:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="text[starts-with(., 'MG:')]">
	<xsl:for-each select="text">
                <xsl:value-of select="text"/>
        </xsl:for-each>
</xsl:template>
</xsl:stylesheet>

OUPUT in CookTop:

A:SOMEERRORA:SOMEOTHERA:ANDANOTHER



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent