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

Mixing pull and push

Subject: Mixing pull and push
From: "Pawson, David" <DPawson@xxxxxxxxxxx>
Date: Mon, 4 Sep 2000 14:56:25 +0100
pull and push
Problem.
The lack of structure in a DTD I've been given is causing me a headache.
Its essentially an XHTML subset. h1 to h4, usual mix of p, ul, ol etc.

The problem centres around trapping Hx elements
in push elements, then using moded templates for
non Hx elements.

Previously I've either pushed or pulled, this is the first
time I've had to do both together.
I'd assumed that I could have nop templates (unmoded) to
handle all the push elements.

I'm basically looking for an output (xml)
that looks like
  <h1><head>Old h1 content</head

    any content up to next sibling
    Hx, copied would do it, but lets say
    p maps to xp, table to xtable etc.

   <h2><head>Old h2 content</head>
	ditto
     nesting down to h4's
   </h2>
   </h1>
   <h1><head>  etc.

the algorithm to validate which levels to close
and so on would be straightforward in an ordinary language,
but I'm having difficulties using XSLT for it.

Since I'm basically dealing with the sibling axis, 
I'm finding that I'm double processing elements, 
once, when I pull them using apply-templates select="following-sibling::....
and then again as a response to either a moded template or
a non moded template.

I'm looking for an approach that sounds reasonable
in outline.
I've tried 3 so far, and each works simplistically, but
falls down with real content. 

  the only time I want to use xsl:apply-templates/> is with
the (very) few actual nested elements such as lists and tables.

Any suggestions appreciated.


 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.