Subject: RE: [xsl] What's wrong with my code Version 1.0 (Altova XMLSPY) From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Fri, 6 Jun 2008 16:06:36 +0100 |
NewsEnvelop should be NewsEnvelope. XSLT is very sensitive to such mistakes. One of the reasons that schema-aware processing was added to the language in XSLT 2.0 is that it enables such errors to be detected and reported at compile time. Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: Pankaj Chaturvedi [mailto:pankaj.chaturvedi@xxxxxxxxx] > Sent: 06 June 2008 16:03 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: RE: [xsl] What's wrong with my code Version 1.0 > (Altova XMLSPY) > > Thanks Florent. > > I think I got my error. I should have gone with (as Vycheslav also > suggested) > > <xsl:template match="/"> > <XMLFileCollection> > <XMLFile> > <issueinfo> > <!-- Issue Level title Information --> > <xsl:apply-templates select="NewsML/NewsEnvelop//Party"/> > <xsl:apply-templates select="NewsML/NewsItem"/> > > > I am getting my NewsItem working correctly, but what happened > to NewsEnvelop elements, I am getting nothing: > > > <xsl:template match="NewsML/NewsEnvelop//Party"> > <!-- Title --> > <title><xsl:value-of > select="string(./Property[@FomalName='NewsRoom']/@Value)"/></title> > </xsl:template> > > As per my understanding match path > "NewsML/NewsEnvelop//Party" means I have reached the <Party> > element and now can access its corresponding elements, text, > attributes etc. Then why there is no title info > (<title><xsl:value-of > select="string(./Property[@FomalName='NewsRoom']/@Value)"/></title>). > > Any ideas. Please correct me if my understanding are wrong. > > > > Best, > > Pankaj Chaturvedi > > ============================================================== > ============== > ================ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ______________________________________________________________________ > > _______ Envoyez avec Yahoo! Mail. Une boite mail plus intelligente > > http://mail.yahoo.fr > > <HTML><BODY><P><hr size=1></P> > <P><STRONG> > > Confidentiality Notice:" This message and any attachment(s) > contained here are information that is confidential, > proprietary to IDS Infotech Ltd. and its customers. > Contents may be privileged or otherwise protected by law. The > information is solely intended for the individual or the > entity it is addressed to. If you are not the intended > recipient of this message, you are not authorized to read, > forward, print, retain, copy or disseminate this message or > any part of it. If you have received this e-mail in error, > please notify the sender immediately by return e-mail and > delete it from your computer." > > </STRONG></P></BODY></HTML>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] What's wrong with my code, Pankaj Chaturvedi | Thread | RE: [xsl] What's wrong with my code, Pankaj Chaturvedi |
RE: [xsl] What's wrong with my code, Pankaj Chaturvedi | Date | RE: [xsl] What's wrong with my code, Pankaj Chaturvedi |
Month |