xsl-list
[Top] [All Lists]

Re: [xsl] Counting records [Solved] - addendum

2008-12-09 06:35:36
Bradley, Peter wrote:
Because that's what BizTalk requires.

I don't know BizTalk but you said it requires that saying "where I
have no control over the XML being used". However the solutions suggested to you did not ask you to change the XML, the simply suggested to change the stylesheet to e.g.

<xsl:stylesheet
    xmlns:df="http://HesaValidateSqlSend";
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    version="1.0">

    <xsl:template match="/">
      <xsl:value-of select="count(/df:HesaValidate_Response/df:row)"/>

If you can change the stylesheet in BizTalk to use the cumbersome

count(/*[local-name()='HesaValidate_Response' and
namespace-uri()='http://HesaValidateSqlSend']/*[local-name()='row' and
namespace-uri()='http://HesaValidateSqlSend'])

why can't you change it as suggested? Both are changes to the stylesheet only.

You do not even need to put the namespace declaration on the xsl:stylesheet element if you can't change that, doing


<xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    version="1.0">

    <xsl:template match="/">
      <xsl:value-of xmlns:df="http://HesaValidateSqlSend";
                    select="count(/df:HesaValidate_Response/df:row)"/>

would suffice as well.


--

        Martin Honnen
        http://JavaScript.FAQTs.com/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--