This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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@baan.nl]
Sent: Thursday, May 10, 2001 9:34 AM
To: Xsl-List (E-mail)
Subject: [xsl] 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]