I have following XML.
<sec xmlns:xlink="http://www.w3.org/1999/xlink" id="fm2" sec-type="other">
<title />
<?SAE page="ii"?>
<p><bold>Other SAE books of interest:</bold></p>
<p><bold>Electric and Hybrid-Electric Vehicles</bold></p>
<p>Edited by Ronald K. Jurgen</p>
<p>(Product Code: PT-143.SET)</p>
<p><bold>Diesel Emissions and Their Control</bold></p>
<p>By Magdi K. Khair and W. Addy Majewski</p>
<p>(Product Code: R-303)</p>
<p><bold>Hybrid Powered Vehicles, Second Edition</bold></p>
<p>By John M. German</p>
<p>(Product Code: T-125)</p>
<p>For more information or to order a book, contact SAE International at</p>
<p>400 Commonwealth Drive, Warrendale, PA 15096-0001, USA;</p>
<p>phone 877-606-7323 (U.S. and Canada only) or 724-776-4970 (outside U.S. and Canada);</p>
<p>fax 724-776-0790;</p>
<p>email <email>CustomerService@sae.org</email>;</p>
<p>website <uri xlink:href="http://books.sae.org">http://books.sae.org</uri>.</p>
</sec>
I have to create XSLT for it. I am doing it in this way:
<xsl:for-each select="book-front/sec">
<xsl:value-of select="title"/>
<xsl:value-of select="p"/>
</xsl:for-each>
But it is not parsing anything.
The main problem is parsing <?SAE page="ii"?>
It is not allowing its further attributes to parse. I don't know how to parse it and then what will be its corresponding XSLT.
My xml is
<sec id="ch1.4">
<label><bold>1.4</bold></label>
<title><bold>Energy Consumption of Commercial Vehicles</bold></title>
<p>Commercial vehicle manufacturing and operation is a major source of energy consumption globally. In 2009, the United States consumed 23% of the global petroleum production [<xref ref-type="bibr" rid="R3">1.3</xref>]. According to the U.S. Department of Energy, 72% <?SAE page="8"?>of the U.S. petroleum consumption is for transportation. Commercial vehicles consumed up to 18.7% of the total energy consumption in transportation in the United States. In other words, commercial vehicles in the United States alone consumed over 3% of the global petroleum production in 2009 [<xref ref-type="bibr" rid="R3">1.3</xref>, <xref ref-type="bibr" rid="R34">1.34</xref>].</p></sec>
after applying ur code, i got
Commercial vehicle manufacturing and operation is a major source of energy consumption globally. In 2009, the United States consumed 23% of the global petroleum production [
But i want
**Energy Consumption of Commercial Vehicles**
Commercial vehicle manufacturing and operation is a major source of energy consumption globally. In 2009, the United States consumed 23% of the global petroleum production [1.3 ]. According to the U.S. Department of Energy, 72%Page 8 of the U.S. petroleum consumption is for transportation. Commercial vehicles consumed up to 18.7% of the total energy consumption in transportation in the United States. In other words, commercial vehicles in the United States alone consumed over 3% of the global petroleum production in 2009 [
Now explain how to get this output ?? I hope my problem is more understandable to you now.