xsl-list
[Top] [All Lists]

Re: [xsl] getting the child element based on attribute

2010-11-13 10:30:04
I am getting empty values for these two elements

--- On Sat, 13/11/10, Brandon Ibach 
<brandon(_dot_)ibach(_at_)single-sourcing(_dot_)com> wrote:

From: Brandon Ibach <brandon(_dot_)ibach(_at_)single-sourcing(_dot_)com>
Subject: Re: [xsl] getting the child element based on attribute
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Date: Saturday, 13 November, 2010, 11:29 AM
On Fri, Nov 12, 2010 at 6:44 PM, ram
<ram_kurra(_at_)yahoo(_dot_)co(_dot_)in>
wrote:
Here is my xml file

<Config-Policy>
  <Policy QMName="BRKQM">
     <QMNumber>01</QMNumber>
  </Policy>
  <Policy QMName="BSKQM">
     <QMNumber>02</QMNumber>
  </Policy>
</Config-Policy>

Here is my xsl

<xsl:template match="/">
       <xsl:variable name="qmName"
             
 select="dp:variable('var://context/MYMQMD/QMName')" />
       <xsl:variable name="config"        
           
select="document('local:///QM_Mapping.xml')" />

     <xsl:variable name="configQMName"
       
 select="$config/Config-Policy/Policy[(_at_)QMName=$qmName]"
/>
       <xsl:variable name="qmNumber"
select="$configQMName/QMNumber" />
</xsl:template>

   But i am getting nothing from these variables.
        Can any one suggest how should i proceed
on this

The last two variables look fine, but "qmName" and "config"
have some
pretty non-standard-looking expressions in their "select"
attributes.
What values are you getting in those variables?

-Brandon :)

--~------------------------------------------------------------------
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>
--~--





--~------------------------------------------------------------------
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>
--~--