[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSL:FO Identify Transforms
Hi Chris,
On 9/19/2011 8:25 AM, Chris Booth wrote: So does this mean I need to know the structure of the XML at block level? If I understand your requirement correctly, yes it does. (It's not really an XSL-FO identity transformation, is it? It's an XSL-FO to generate a formatted version that shows tags or some other "literal" representation of markup structure.) Admittedly this is a challenge for arbitrary XML inputs, but there are heuristic approaches you could consider, such as "any element that has no non-whitespace text node siblings is a block" or "any element of a type that has no non-whitespace siblings anywhere is a block", or "any element of a type that has non-whitespace siblings anywhere is inline, and all other elements are blocks". (I am sure that intrepid XSL-Listers would help you write code to derive any of these if that's what was needed. Me, I need to take a nap.) A poor-man's solution could be to treat all elements as blocks. Or, you could flow everything into a single "preformatted" block, which would respect the whitespace in your XML source including line feeds (and then see to it that it's preserved as you parse and process). It all depends on how you want your output to look. I am hoping for a dynamic XSL:FO version that will allow the XML to "published" with node names and values. It does not need to be in a pretty format, a simple single string would be adequate although not appealing.
-- ====================================================================== 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 ======================================================================
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|