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

Re: Create an end element - possible?

Subject: Re: Create an end element - possible?
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Mon, 04 Oct 2010 11:40:59 -0400
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

fighting XSLT
I want to use XSLT options and functions, but if the base is not a "real" XML, than i have to use "workarounds" to realize the project.
Sometimes a "workaround" is the only way to do it.

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.
In XSLT 1.0 I'm limited - if i have 2.0 it is much easier because i can transfer the content in new xml structures.


Enclose find a sample of the DATA content
<COL>
<DATA>&lt;SPAN STYLE= &quot;font-weight: bold;text-align: center;&quot; &gt;VEREINBARUNG (VERTRAG)&lt;/SPAN&gt;&lt;SPAN STYLE= &quot;text-align: center;&quot; &gt;</DATA>
</COL>

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
======================================================================

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.