Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Newbie to XML & XSL - problems selecting element values in XSL Newbie to XML & XSL - problems selecting element values in XSLTo: NULL Date: 11/5/2007 10:47:00 PM Greetings, Im having alot of difficulties trying to select the value of an element from my XML file to XSL file. Im trying to select the value of element <DeliveryNoteNo> into my XSL file output, Xpath matches the path but does not select the value of <DeliveryNoteNo> i.e it prints from the line <strong>Deliver Note No: </strong> but cannot select the value of my:DeliveryNoteNo. Does anybody have any ideas? Perhaps I need to look back at my schema too? See xml and xsl files below. Xml file extract. <?xml version="1.0" encoding="UTF-8"?> <!-- edited with XMLSpy v2007 (http://www.altova.com) by Rob (EMBRACE) --> <PODBatch xmlns="http://my-pod/namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://my-pod/namespace E:\DOCUME~1\Rob\Desktop\POD02.XSD"> <POD> <DeliveryInfo> <DeliveryNoteNo>DN012345</DeliveryNoteNo> <DeliveryDateTime>01/11/07 10:35</DeliveryDateTime> <DeliveryDrivername>Bill Egg</DeliveryDrivername> <DeliveryDriverSignature>B.Egg</DeliveryDriverSignature> <DeliveryStatus>In transit</DeliveryStatus> </DeliveryInfo> </POD> </PODBatch> Here is my full XSL file:- <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi ="http://www.w3.org/2000/10/XMLSchema-instance" xmlns:my="http://my-pod/namespace"> <xsl:template match="/"> <html> <Header> <img src="http://i140.photobucket.com/albums/r13/robtyketto/truck-clipart-icon2_ys61.gif" align="left"/> <h2>Proof-of-Delivery</h2> <xsl:apply-templates select="//my:POD/my:DeliveryInfo"/> <br></br> <hr></hr> </Header> <body> <h3>Sender:</h3> <address> Company<br /> </address> </body> </html> </xsl:template> <xsl:template match="my:POD/my:DeliveryInfo"> <strong>Deliver Note No: </strong> <xsl:value-of select="my:DeliveryNoteNo"/> </xsl:template> </xsl:stylesheet> Thanks Rob W | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
