[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Create an end element - possible?
Hi Armin,
At 03:28 AM 10/4/2010, you wrote (to Liam): > But, that is not how XSLT works - it generates elements. > You have two main choices here... > (1) write templates that will match the input where there is a common > ancestor of the <w:p> and </w:p> tags, so that you can generate a > complete element... or... > (2) use xsl:text with disable-output-escaping=yes and generate the > tags directly (this is fighting XSLT). as written - i use Option 2 now and it works That's true, but it's probably not true in this case. At any rate, if you're using XSLT 2.0, solutions of type (1) in Liam's description typically take the form of grouping problems. In essence, your code has to make inferences based on the data content regarding structures you want in the result. Such solutions are also possible using XSLT 1.0, although with greater effort. The main advantage of doing it the Right Way (avoiding solutions of type 2) are: robustness (your code is not as fragile if it has to run in different architectures or processors); and detecting and handling exceptions. See a sample of the "XML" - which have the HTML info in the content. It's true this is very nasty stuff to have to deal with. For one thing, you have no assurance going in that the "HTML" pseudo-markup will actually parse -- like this example (there is an unclosed open tag). Do you plan to intercept that or let it through? Cheers, Wendell ====================================================================== 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
|