Re: Sanitizing data

Hi JV, is it possible to have some code examples, I am not 100% sure of
what you are dealing with or trying to achieve. I think this may help
though:

** XML **

<root>
	<mynode>
		<mychild>Fela</mychild>
		<mychild>Femi</mychild>
		<mychild>Seun</mychild>
	</mynode>
</root>

If you are expecting just a single child for mynode, you could do
something like this.

** XSL **

<xsl:choose>
	<xsl:when test="count( //mynode/mychild ) = 1">
		<xsl:value-of select="//mynode/mychild" />
	</xsl:when>
	<xsl:otherwise>
		Some error message
	</xsl:otherwise>
</xsl:choose>


-- 
      ,'/:.          David Arakelian 
    ,'-/::::.        http://www.theatons.com/
  ,'--/::(@)::.      Web Security Consultant
,'---/::::::::::.    Wales
____/:::::::::::::.  
  T H E A T O N S  

Received on Saturday, 30 May 2015 04:00:51 UTC