>[If a child node isn't there,] returning an empty string is a good >result. But: It could be that the XSLT contains an error - and I >never find it :(
Perhaps you need a different kind of tool, either a stylesheet tracer or a validating XML parser for your data (along with a schema to validate against). Not knowing the names of the child elements makes the test more abstract, but it can still be done as generic XSLT. <xsl:when test="source/p/*"> this would enclose the action you want to take if source/p has any child elements. Based on what you've written so far, it appears that you have a set of rules: some elements must exist, some may or may not, etc. You can probably find suitable XPath expressions even if you don't know the element name. If you can describe conditions that must be true to issue a message, then you can probably make an XPath for them. .................David Marston
