[xsl] Newbie to XSLT needs help with MIF->XML->SGML output

Subject: [xsl] Newbie to XSLT needs help with MIF->XML->SGML output
From: <convextech@xxxxxxxxxx>
Date: Thu, 12 Jan 2006 9:53:25 -0600
I've been lurking on this list trying to learn XSLT due to a project that landed in my lap and so far I've managed to fix some things, but can't for the life of me fix the other stuff. I have four days to *at the very least* get all of the technical data out of a 4,000-page book that I can move around via scripts (or manually, if I have to), once it's all output.
 
The XML configs & XSL stylesheets I have were written to go along with an application that takes a FrameMaker MIF
file and transforms it to XML, then SGML. I think a major part of the problem is that some of the transformation of the data is done by the application's DLLs. I don't have the source code, and frankly I don't even want to start messing with that! I am no programmer and this is already way over my head as it is. Yeah, the easy part would be to just ask the developer but he got religion this summer, quit his job, and went to Mexico to be a missionary. ;-)

I don't know if there's a way to decompile the DLLs or what, but again, I don't want to go there. I'd like to work around it and if possible, simply do the transforms & debugging through Stylus Studio or a similar program without the application itself. 'Course, it would help if I understood how the hell to debug the damn thing in the first place! I've been running the app, then editing the XSL over & over until I get it right. ;-)
 
Here are my problems so far (in the SGML):
- missing <chghistory> (required element that should appear after <tmidno>)
- <doctype> ouputs with two instances of the text, plus text from a pgf that should have been ignored.
- <modelno> missing (required element that should appear after <nomen> within <prtitle>)
- one table missing from Front Matter
- in the <pl> chapter, any empty element (or empty cell in FM) is opened at that level, but is not closed (i.e., I need to see  <partno></partno><partnosym></partnosym><desc></desc> instead of <partno><partnosym><desc></desc></partnosym></partno>).  
- <refdes> missing
- The biggest problem I have right now is that a lot of whitespace is being stripped, i.e., trailing spaces, spaces after commas, before paretheses, etc.

I've tried preservibg space but then the application craps out because it evidently needs some of the whitespace deleted. 

Is there anyone here that wants to have a gander at it? 

Current Thread