[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XML slice design
Hi I need some help on XML design and XSL. I have an XML file which represents text data like paragraph, list, chapter, etc?, you can compare it at a TEI document (see XML source at the end) I must make HTML slice with this XML file. First What do you advise me to delimit each slice in my XML file. I have choosen to delimit slice with an empty element called pb. Have you a better solution? With my solution(pb empty element), I have some problem with XSL or more precisely with selecting the good node-set. XML File <div type="chapter"> <p>?</p> <div type="part"> <p>?</p> <note>?</note> <list><item>?</item></list> <pb/><!?End of my first slice--> <qa>?</qa> <pb/><!?End of my second slice--> </div> <div type="part"> <p>?</p> <note>?</note> <pb/><!?End of my third slide--> </div> </div> Note: There are several chapter in my XML file Note 2: This XML file can be deeper, a part can contain subpart(<div type="subpart">), subpart can contain other div tag. XSL template <xsl:template match="div[@type='chapter']"> <div class="slice"><!-- It is HTML div tag --> <xsl:for-each select="descendant::pb"> <xsl:apply-templates select="NODE-SET which corresponds to the slice"/> </xsl:for-each> </div> </xsl:template> Thanks for your help Sydney ___________________________________________________________ Do You Yahoo!? Achetez, vendez! À votre prix! Sur http://encheres.yahoo.fr XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|