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

Re: cleaning up ill-structured html

Subject: Re: cleaning up ill-structured html
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Thu, 23 Jan 2003 18:21:51 -0500
ill structure
Ole,

While what Simon says is generally true, it's not *completely* true that XSLT can't be used to interpolate a hierarchy. See the XSL FAQ at http://www.dpawson.co.uk/xsl/sect2/flatfile.html for an approach treating your step 2 as a grouping problem, and leveraging your hierarchy that way (the trick is to use a key to associate each node with its most recently preceding break, then create a new paragraph every time you process a break with any associated nodes, pulling them into it).

It's not an obvious technique, but it's pretty easy once you grasp the principle. Ask again if you need more specific help.

Cheers,
Wendell

At 05:43 PM 1/23/2003, you wrote:
Probably best to start over with the HTML and use regular expressions, e.g., with Perl. This is not an XSL subject, the html you are starting with is not tree-structure so XSL is no help.

simon

On Thursday, January 23, 2003, at 03:54 PM, Ole Sandum wrote:

...


I can do step 1, but step 2 gives me trouble. To
formalise: how do I convert a structure structure like

<break/>+ { other+ <break/>+ }*

into

{ <p> other+ </p> }*

I fear the solution is really simple. Any ideas?


======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


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.