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

[Fwd: [4suite] Patch for 4XSLT 0.9.0]

Subject: [Fwd: [4suite] Patch for 4XSLT 0.9.0]
From: Uche Ogbuji <uche.ogbuji@xxxxxxxxxxxxxxx>
Date: Fri, 02 Jun 2000 08:38:44 -0600
[Fwd: [4suite] Patch for 4XSLT 0.9.0]

-------- Original Message --------
Subject: [4suite] Patch for 4XSLT 0.9.0
Date: Thu, 01 Jun 2000 16:53:56 -0600
From: Jeremy Kloth <jeremy.kloth@xxxxxxxxxxxxxxx>
Organization: Fourthought, 		Inc
To: 4suite@xxxxxxxxxxxxxxxxxxxxxx

In testing for the upcoming release of the 4Suite tools, we have
came across a rather bad bug in the XSLT TextWriter code.

Basically it was printing an end tag after a single < /> element tag.

What follows is the diff of the file TextWriter.py

--- removed line
+++ changed line

in function endElement()
@@ -139,9 +142,11 @@
         trace("End Element %s" % name)
         if self.__currElement:
-            self.__completeLastElement(1)
+            elementIsEmpty = self.__completeLastElement(1)
+        else:
+            elementIsEmpty = 0
         if self.__outputParams.method != 'html' or (string.upper(name)
not in HTML_FORBIDDEN_END):
-            text = '</' + name + '>'
+            text = (not elementIsEmpty) and ('</' + name + '>') or ''
             if self.__outputParams.indent == 'yes':
                 self.__indent = self.__indent[:-2]
             if (self.__outputParams.method != 'html') or \

and in function __completeLastElement()

@@ -181,6 +186,7 @@
                 else:
                     self.__result = self.__result + '>'
                     self.__nextNewLine = 0
+                    elementIsEmpty = 0
             else:
                 self.__result = self.__result + '>'
                 self.__nextNewLine = 1
@@ -188,5 +194,5 @@
             if self.__outputParams.indent == 'yes':
                 self.__indent = self.__indent + '  '
             self.__currElement = None
-        return self.__currElement
+        return
elementIsEmpty                                                                                                                                       


Sorry for any problems that this has caused.

-- 
Jeremy Kloth                             Consultant
jeremy.kloth@xxxxxxxxxxxxxxx             (303)583-9900 x 102
Fourthought, Inc.                        http://www.fourthought.com
Software-engineering, knowledge-management, XML, CORBA, Linux, Python
_______________________________________________
4suite mailing list
4suite@xxxxxxxxxxxxxxxxxxxxx
http://lists.fourthought.com/mailman/listinfo/4suite


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.