Subject: Re: [xsl] Breaking up XML(XHTML) into pages From: David Carlisle <davidc@xxxxxxxxx> Date: Tue, 25 Mar 2003 13:17:35 GMT |
I put //div[@class='section'][popsition()=1]//h2 in XPath and it is true. It gives the first h2 section. <!-- manage h2 elements --> <xsl:template match="//xhtml:div[@class='section']/xhtml:h2"> You need to decide whether your input is or is not in the XHTML namespace, it is very inconvenient in XSLT to handle both at the same time. If the first version works, then h2 is not in the xhtml namespace in your source file and in that case the second one won't match. Conversely if the second one works then your source file does use the XHTML namespace (assuming that is what xhtml: is bound to) and in that case the first expression should not match anything. <xsl:value-of select="*"> </xsl:value-of> If you use a select attribute value-of should be empty, that isn't empty it contains a newline. Sorry I couldn't understand the rest of your problem statement. <input xmlns="" If your XSLT engine is adding xmlns="" to your output it is usually a sign that you are generating some elements in a namespace and some not. this is usually a bad idea. As for the input document you should decide whether you are generating xhtml in which case everything should be in the xhtml namespace, or html, in which case everything should be in no namespace. David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Breaking up XML(XHTML) in, Leonidas Kanellos | Thread | Re: [xsl] Breaking up XML(XHTML) in, Leonidas Kanellos |
Re: [xsl] xmlDoc.documentElement Er, Oleg Tkachenko | Date | Re: [xsl] Copy XML into an attribut, David Carlisle |
Month |