xsl-list
[Top] [All Lists]

Re: [xsl] What's wrong with my code Version 1.0 (Altova XMLSPY)

2008-06-06 07:41:12
i prefer use match="/*" (this match just any root element - since
developers often love change namespace and/or name for root element so
i am just skip this step

On Fri, Jun 6, 2008 at 6:27 PM, Florent Georges <lists(_at_)fgeorges(_dot_)org> 
wrote:
Pankaj Chaturvedi wrote:

 Hi

      <xsl:template match="/">
[...]
              <xsl:apply-templates select="NewsEnvelop//Party"/>
              <xsl:apply-templates select="NewsItem"/>

 In your sample input, the document node doesn't have any child
element named NewsEnvelop nor NewsItem.  I guess you are after the
following instead:

   <xsl:template match="/">
      ...
      <xsl:apply-templates select="NewsML/NewsEnvelop//Party"/>
      <xsl:apply-templates select="NewsML/NewsItem"/>

or:

    <xsl:template match="/NewsML">
      ...
      <xsl:apply-templates select="NewsEnvelop//Party|NewsItem"/>

 They are slightly different, that depends on your inputs, but it
seems in your case they mean the same thing (extrapolated from your
sample input).

 Regards,

--drkm
























     
_____________________________________________________________________________
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente 
http://mail.yahoo.fr


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