[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Separate same level elements on a criteria
Hi Group,
I'm wondering if anyone has a slick way of solving this problem. I have an xml document like: <root> <head_document>Title</head_document> <para>This is a paragraph</para> <bold_para>This is a paragraph</bold_para> <head>TOC</head> <section>1. Title</section> <section>2. Title</section> <head>Heading 1</head> <paragraph_indent>This is a paragraph</paragraph_indent> <paragraph_outdent>This is a paragraph</paragraph_outdent> <head>Heading 2</head> <paragraph>This is a paragraph</paragraph> <chart>This is a chart</chart> </root> Basically I'm making a bunch of html documents from this xml document and a table of contents. Table of contents is easy (I need to grab the <head_document> element and skip the <head>TOC</head> element): <xsl:template match="root" mode="toc"> <ul> <xsl:for-each select="head_document|head[not(contains(., 'TOC'))]"> <li>Do Something</li> </xsl:for-each> </ul> </xsl:template>
Any ideas on how to do this would be very helpful. I thought group-by would probably be the answer but so far my research hasn't turned up anything. Thanks, Spencer
|
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
|