Subject: RE: XSLT Inferencing From: "Hunter, David" <dhunter@xxxxxxxxxxxx> Date: Fri, 6 Aug 1999 11:33:54 -0400 |
Hmm. I'm thinking that you might consider doing it the other way around. That is, instead of using XSL to "analyze" the XML document, load it into a DOM and figure all of this stuff out from there, in whatever programming language you're familiar with. (After all, this sounds more like straight programming than transformation.) Then, once you've done that, instead of manually converting to HTML/whatever, you can use XSL for the conversion. If you're really motivated, you could probably even generate your XSL stylesheet on the fly, based on the output from the above. David Hunter david.hunter@xxxxxxxxxxxxx MediaServ Information Architects http://www.MediaServ.com -----Original Message----- From: DPawson@xxxxxxxxxxx [mailto:DPawson@xxxxxxxxxxx] Sent: Friday, August 06, 1999 10:39 AM To: xsl-list@xxxxxxxxxxxxxxxx Subject: XSLT Inferencing Given an arbitrary, valid XML document, is it at all reasonable to use XSLT to analyse the document and make a fair guess at which elements are containers, which are atomic etc? e.g. The sort of logic I'm getting at might be: Total element count=100 element x contains 80 descendants none of which hold pcdata, hence its likely to be a container. element y is atomic and first child of element x, hence likely to be a title. element 'para' occurs 38 times with PCDATA content, hence likely to be a paragraph. I'm loathe to use element names for other than basics. Unknowns might be reported as: Element z has only 3 children, a 'candidate' container: Overall objective would be to do an initial analysis along these lines, then manually finish off, to permit transormation into HTML. I'm hoping that a stylesheet might break the back of the work before handing off to a human. Any feedback appreciated. regards, DaveP XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: XSLT Inferencing, Oren Ben-Kiki | Thread | RE: XSLT Inferencing, DPawson |
UNSUBSCRIBE, cjdrake | Date | URL encoding of servlet session ins, Sebastien Sahuc |
Month |