[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Nested sections from flat structure
Linda, Is the output XML structure already defined? If not, you might more explicitly present the document structure by using more structurally oriented tag names. Eliminating mixed content in structural elements is a good start, but in this example there isn't much difference in the input and the output. <topic> <text> <p>first some intro text</p> <p><head>A</head> goes with A.</p> is transformed into <GeneralSection> <Paragraph>first some intro text</Paragraph> <GeneralSection> <SectionTitle>A</SectionTitle> <Paragraph>goes with A.</Paragraph> If you just want to present hierarchy, element names like a,b,c,... work. Longer names are not necessarily better. What's the difference between GeneralSection and GeneralSection? Is the first paragraph a title, a blurb or an intro? Maybe it doesn't matter, but if you're naming, you might as well use structurally meaningful names. For instance, it might make sense to use "book, frontmatter, body, chapter, section, subsection, rearmatter, index, glossary" or "article, abstract, section, notes" sprinkled with name, author, title, paragraph, and such. Vane -----Original Message----- From: Linda van den Brink [mailto:lvdbrink@xxxxxxx] Sent: Thursday, May 10, 2001 9:34 AM To: Xsl-List (E-mail) Subject: Nested sections from flat structure Hi all, I'm wondering about the best (shortest or most elegant or easiest) way to transform an XML document with a 'flat' structure (like an HTML document segmented with h* elements) to an XML document with nested sections. <snip/> Suggestions? Linda 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
|