[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: dl/dt/dd matching

Subject: Re: dl/dt/dd matching
From: Paul Prescod <paul@xxxxxxxxxxx>
Date: Tue, 12 Jan 1999 03:57:12 -0600
dt dd
James Clark wrote:
> 
> Francois Belanger wrote:
> >
> > I'm scratching my head on this one.
> 
> I've been scratching my head for years on this one.  It's a problem in
> DSSSL too.

Actually, it very easy to solve if you solve it in the right place. You
need to augment the input schema (DTD, XSchema, whatever) so that it can
guide the grouping of things.

<!ELEMENT DL (!DTITEM)>
<!GROUP DTITEM (DT, DD)>

Given this document:

<DL>
  <DT>...</DT><DD>..</DD>
  <DT>...</DT><DD>..</DD>
  <DT>...</DT><DD>..</DD>
  <DT>...</DT><DD>..</DD>
</DL>

You get this tree:

DL
   DLITEM
      DT
      DD
   DLITEM
      DT
      DD
   DLITEM
      DT
      DD
   DLITEM
      DT
      DD

David Peterson may have invented this idea in the SGML context, but in
retrospect it is a straightforward application of the computer science
concept of "non-terminal" in a context-free-grammar.

 Paul Prescod  - ISOGEN Consulting Engineer speaking for only himself
 http://itrc.uwaterloo.ca/~papresco

"I want to give beauty pageants the respectability they deserve."
            - Brooke Ross, Miss Canada International


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.