[Laszlo-dev] Patch to use JDOM-1.0-CVS
Amy Muntz
amuntz at laszlosystems.com
Fri Nov 11 11:43:54 PST 2005
Hello Ludovic,
Thank you very much for posting this patch. I'm sure that many people
will find it very useful.
I think the best way to reach an even broader community would be to
post it on the OpenLaszlo wiki. We have a page for installing/using
OpenLaszlo with various configurations. Could you please add this there?
http://wiki.openlaszlo.org/Installation_Instructions
Just a quick note: to use the wiki, you must register with the same
email address you used for the mailing lists! If you have any
problems accessing the wiki, just send me a quick note.
Thanks again for taking the time to post your patch to the community.
Best Regards,
Amy Muntz
OpenLaszlo Project Manager
On Nov 11, 2005, at 10:20 AM, Ludovic Maitre wrote:
> Hi all,
>
> I'm new to Laszlo and would like to use it inside geronimo-1.0 and
> tomcat 5.5.9.
> For doing this i had to patch openlaszlo 3.1rc1 and would like to
> know if this is already done by other peoples.
> If this isn't the case perhaps the patch attached to this mail
> could suffice, and i would like you review it.
> This is a diff, and he's not very cumfortable to use because i
> haven't find a cvs or svn repository against which doing a pretty
> diff from eclipse.
> However it seems to work well under my configuration.
> It seems that it works only against JDOM-1.0-CVS, because with the
> plain 1.0 release i have some errors in the log due to the fact
> that some comments in the xml files of openlaszlo began by hyphens
> ("-"), which seems not to be the case with the jdom cvs.
> Hope this can help, have a good day,
>
> --
> Cordialement,
> Ludo - http://www.ubik-products.com
> ---
> "L'amour pour principe et l'ordre pour base; le progres pour
> but" (A.Comte)
> diff -r -U 3 lps-3.1-src-orig/lps-3.1/WEB-INF/classes/
> AuthenticationServlet.java lps-3.1-src/lps-3.1/WEB-INF/classes/
> AuthenticationServlet.java
> --- lps-3.1-src-orig/lps-3.1/WEB-INF/classes/
> AuthenticationServlet.java 2005-11-02 01:09:56.000000000 +0100
> +++ lps-3.1-src/lps-3.1/WEB-INF/classes/AuthenticationServlet.java
> 2005-11-11 11:51:58.000000000 +0100
> @@ -154,6 +154,10 @@
> String info = "init exception: " + e.getMessage();
> mLogger.debug(info);
> throw new ServletException(info);
> + } catch (IOException e) {
> + String info = "init exception: " + e.getMessage();
> + mLogger.debug(info);
> + throw new ServletException(info);
> }
>
> //-----------------------------------------------------------
> -
> diff -r -U 3 lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/
> openlaszlo/auth/HTTPAuthentication.java lps-3.1-src/lps-3.1/WEB-INF/
> lps/server/src/org/openlaszlo/auth/HTTPAuthentication.java
> --- lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> auth/HTTPAuthentication.java 2005-11-02 01:09:55.000000000 +0100
> +++ lps-3.1-src/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/auth/
> HTTPAuthentication.java 2005-11-11 11:32:27.000000000 +0100
> @@ -152,7 +152,9 @@
> return isOk ? eUsername.getChildText("username") : null;
> } catch (JDOMException e) {
> throw new AuthenticationException(e.getMessage());
> - }
> + } catch (IOException e) {
> + throw new AuthenticationException(e.getMessage
> ());
> + }
> }
>
>
> diff -r -U 3 lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/
> openlaszlo/compiler/Canvas.java lps-3.1-src/lps-3.1/WEB-INF/lps/
> server/src/org/openlaszlo/compiler/Canvas.java
> --- lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> compiler/Canvas.java 2005-11-02 01:09:53.000000000 +0100
> +++ lps-3.1-src/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> compiler/Canvas.java 2005-11-11 11:46:08.000000000 +0100
> @@ -13,16 +13,19 @@
> */
>
> package org.openlaszlo.compiler;
> -import org.openlaszlo.utils.StringUtils;
> -import org.openlaszlo.xml.internal.XMLUtils;
> -import org.openlaszlo.server.Configuration;
> -import org.openlaszlo.server.LPS;
> -import java.util.*;
> -import java.io.Serializable;
> import java.io.File;
> -import org.jdom.Element;
> -import org.jdom.Namespace;
> +import java.util.HashSet;
> +import java.util.Hashtable;
> +import java.util.List;
> +import java.util.Map;
> +import java.util.Set;
> +
> import org.apache.log4j.Logger;
> +import org.jdom.Element;
> +import org.jdom.output.Format.TextMode;
> +import org.openlaszlo.server.Configuration;
> +import org.openlaszlo.server.LPS;
> +import org.openlaszlo.xml.internal.XMLUtils;
>
> public class Canvas implements java.io.Serializable {
>
> @@ -171,7 +174,7 @@
> public String getInfoAsString() {
> org.jdom.output.XMLOutputter outputter =
> new org.jdom.output.XMLOutputter();
> - outputter.setTextNormalize(true);
> + outputter.getFormat().setTextMode(TextMode.NORMALIZE);
> return outputter.outputString(mInfo);
> }
>
> diff -r -U 3 lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/
> openlaszlo/compiler/ClassCompiler.java lps-3.1-src/lps-3.1/WEB-INF/
> lps/server/src/org/openlaszlo/compiler/ClassCompiler.java
> --- lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> compiler/ClassCompiler.java 2005-11-02 01:09:58.000000000 +0100
> +++ lps-3.1-src/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> compiler/ClassCompiler.java 2005-11-11 11:46:30.000000000 +0100
> @@ -12,6 +12,7 @@
> import java.util.*;
> import org.apache.log4j.*;
> import org.jdom.Element;
> +import org.jdom.output.Format.TextMode;
> import org.openlaszlo.xml.internal.XMLUtils;
> import org.openlaszlo.xml.internal.MissingAttributeException;
> import org.openlaszlo.xml.internal.Schema;
> @@ -213,7 +214,7 @@
> mXMLLogger.info("compiling class definition:");
> org.jdom.output.XMLOutputter outputter =
> new org.jdom.output.XMLOutputter();
> - outputter.setTextNormalize(true);
> + outputter.getFormat().setTextMode(TextMode.NORMALIZE);
> mXMLLogger.info(outputter.outputString(elt));
> mXMLLogger.info("compiled to:\n" + buffer.toString() +
> "\n");
> }
> diff -r -U 3 lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/
> openlaszlo/compiler/CompilationEnvironment.java lps-3.1-src/lps-3.1/
> WEB-INF/lps/server/src/org/openlaszlo/compiler/
> CompilationEnvironment.java
> --- lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> compiler/CompilationEnvironment.java 2005-11-02 01:09:54.000000000
> +0100
> +++ lps-3.1-src/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> compiler/CompilationEnvironment.java 2005-11-11 11:46:46.000000000
> +0100
> @@ -506,7 +506,7 @@
> File resolveParentReference(Element element)
> throws CompilationError
> {
> - return new File(Parser.getSourcePathname(element.getParent
> ()));
> + return new File(Parser.getSourcePathname
> (element.getParentElement()));
> }
>
> /** Resolve the value of the "src" attribute, relative to the
> diff -r -U 3 lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/
> openlaszlo/compiler/Compiler.java lps-3.1-src/lps-3.1/WEB-INF/lps/
> server/src/org/openlaszlo/compiler/Compiler.java
> --- lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> compiler/Compiler.java 2005-11-02 01:09:56.000000000 +0100
> +++ lps-3.1-src/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> compiler/Compiler.java 2005-11-11 11:45:22.000000000 +0100
> @@ -531,10 +531,10 @@
>
> protected void processCompilerInstruction
> (CompilationEnvironment env,
>
> ProcessingInstruction pi) {
> - if (pi.getValue("class") != null)
> - processClassInstruction(env, pi.getValue("class"), pi);
> - if (pi.getValue("classes") != null) {
> - for (Iterator iter = Arrays.asList(pi.getValue
> ("classes").split("\\s+")).iterator(); iter.hasNext(); ) {
> + if (pi.getPseudoAttributeValue("class") != null)
> + processClassInstruction(env, pi.getPseudoAttributeValue
> ("class"), pi);
> + if (pi.getPseudoAttributeValue("classes") != null) {
> + for (Iterator iter = Arrays.asList
> (pi.getPseudoAttributeValue("classes").split("\\s+")).iterator();
> iter.hasNext(); ) {
> processClassInstruction(env, (String) iter.next(),
> pi);
> }
> }
> @@ -543,7 +543,7 @@
> protected void processClassInstruction(CompilationEnvironment
> env,
> String className,
> ProcessingInstruction
> pi) {
> - String inlineString = pi.getValue("inline-only");
> + String inlineString = pi.getPseudoAttributeValue("inline-
> only");
> if (inlineString != null) {
> boolean inline = Boolean.valueOf
> (inlineString).booleanValue();
> ClassModel classModel = env.getSchema().getClassModel
> (className);
> diff -r -U 3 lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/
> openlaszlo/compiler/CompilerUtils.java lps-3.1-src/lps-3.1/WEB-INF/
> lps/server/src/org/openlaszlo/compiler/CompilerUtils.java
> --- lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> compiler/CompilerUtils.java 2005-11-02 01:09:58.000000000 +0100
> +++ lps-3.1-src/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> compiler/CompilerUtils.java 2005-11-11 11:30:33.000000000 +0100
> @@ -157,7 +157,7 @@
> // To simplify the implementation, root canvas and library
> // elements are also considered to be at the top level, as is
> // a canvas inside a top level element.
> - Element parent = element.getParent();
> + Element parent = element.getParentElement();
> return parent == null
> || (ToplevelCompiler.isElement(parent) &&
> isAtToplevel(parent));
> diff -r -U 3 lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/
> openlaszlo/compiler/DataCompiler.java lps-3.1-src/lps-3.1/WEB-INF/
> lps/server/src/org/openlaszlo/compiler/DataCompiler.java
> --- lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> compiler/DataCompiler.java 2005-11-02 01:09:55.000000000 +0100
> +++ lps-3.1-src/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> compiler/DataCompiler.java 2005-11-11 15:07:15.000000000 +0100
> @@ -8,8 +8,10 @@
> * J_LZ_COPYRIGHT_END
> *********************************************************/
>
> package org.openlaszlo.compiler;
> +import org.openlaszlo.auth.AuthenticationException;
> import org.openlaszlo.iv.flash.api.action.*;
> import java.io.*;
> +
> import org.jdom.Element;
> import org.jdom.JDOMException;
> import org.openlaszlo.xml.internal.XMLUtils;
> @@ -50,10 +52,12 @@
> Element newdata = new org.jdom.input.SAXBuilder
> (false)
> .build(file)
> .getRootElement();
> -
> + newdata.detach();
> data.addContent(newdata);
> } catch (org.jdom.JDOMException e) {
> throw new CompilationError(e);
> + } catch (IOException e) {
> + throw new CompilationError(e.getMessage());
> } catch (java.lang.OutOfMemoryError e) {
> // The runtime gc is necessary in order for
> subsequent
> // compiles to succeed. The System gc is for good
> diff -r -U 3 lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/
> openlaszlo/compiler/NodeModel.java lps-3.1-src/lps-3.1/WEB-INF/lps/
> server/src/org/openlaszlo/compiler/NodeModel.java
> --- lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> compiler/NodeModel.java 2005-11-02 01:09:56.000000000 +0100
> +++ lps-3.1-src/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> compiler/NodeModel.java 2005-11-11 11:30:15.000000000 +0100
> @@ -444,7 +444,7 @@
> // Since it's only used for compiler warnings about duplicate
> // names this doesn't break program compilation.
> boolean topLevelDeclaration() {
> - Element parent = element.getParent();
> + Element parent = element.getParentElement();
> if (parent == null) {
> return false;
> }
> @@ -606,7 +606,7 @@
> // Check if we are aliasing another 'name'
> // attribute of a sibling
> if (name.equals("name")) {
> - Element parent = element.getParent();
> + Element parent = element.getParentElement();
> if (parent != null) {
> for (Iterator iter2 =
> parent.getChildren().iterator(); iter2.hasNext();
> ) {
> @@ -696,6 +696,8 @@
> .build(file)
> .getRootElement();
> data.addContent(newdata);
> + } catch (IOException e) {
> + throw new CompilationError(e);
> } catch (org.jdom.JDOMException e) {
> throw new CompilationError(e);
> } catch (java.lang.OutOfMemoryError e) {
> @@ -781,7 +783,7 @@
> }
>
> String parent_name =
> - element.getParent().getAttributeValue("id");
> + element.getParentElement().getAttributeValue("id");
> String name_loc =
> (name == null ?
> CompilerUtils.attributeLocationDirective(element,
> "event") :
> @@ -1077,7 +1079,7 @@
> String value = element.getAttributeValue("value");
> String when = element.getAttributeValue("when");
> String typestr = element.getAttributeValue("type");
> - Element parent = element.getParent();
> + Element parent = element.getParentElement();
> String parent_name = parent.getAttributeValue("id");
>
> if (parent_name == null) {
> diff -r -U 3 lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/
> openlaszlo/compiler/Parser.java lps-3.1-src/lps-3.1/WEB-INF/lps/
> server/src/org/openlaszlo/compiler/Parser.java
> --- lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> compiler/Parser.java 2005-11-02 01:09:53.000000000 +0100
> +++ lps-3.1-src/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> compiler/Parser.java 2005-11-11 11:39:58.000000000 +0100
> @@ -18,7 +18,7 @@
> import org.jdom.Element;
> import org.jdom.JDOMException;
> import org.jdom.Namespace;
> -import org.jdom.input.JDOMFactory;
> +import org.jdom.JDOMFactory;
> import org.jdom.input.SAXBuilder;
> import org.jdom.input.SAXHandler;
> import org.jdom.output.SAXOutputter;
> @@ -263,7 +263,7 @@
> // factory, which is not what you want!
> protected org.jdom.input.SAXHandler
> createContentHandler() {
> try {
> - return new SourceLocatorHandler(factory);
> + return new SourceLocatorHandler(getFactory());
> } catch (IOException e) {
> throw new ChainedException(e);
> }
> @@ -682,7 +682,7 @@
> }
>
>
> - class SourceLocatorJDOMFactory extends
> org.jdom.input.DefaultJDOMFactory {
> + class SourceLocatorJDOMFactory extends
> org.jdom.DefaultJDOMFactory {
>
> public SourceLocatorJDOMFactory () {
> super();
> diff -r -U 3 lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/
> openlaszlo/compiler/ResourceCompiler.java lps-3.1-src/lps-3.1/WEB-
> INF/lps/server/src/org/openlaszlo/compiler/ResourceCompiler.java
> --- lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> compiler/ResourceCompiler.java 2005-11-02 01:09:55.000000000 +0100
> +++ lps-3.1-src/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> compiler/ResourceCompiler.java 2005-11-11 11:48:08.000000000 +0100
> @@ -49,7 +49,7 @@
> {
> File file = null;
>
> - if (element.hasChildren()) {
> + if (!element.getChildren().isEmpty()) {
> file = mEnv.resolveParentReference(element);
> } else {
> file = mEnv.resolveReference(element);
> diff -r -U 3 lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/
> openlaszlo/compiler/ScriptElementCompiler.java lps-3.1-src/lps-3.1/
> WEB-INF/lps/server/src/org/openlaszlo/compiler/
> ScriptElementCompiler.java
> --- lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> compiler/ScriptElementCompiler.java 2005-11-02 01:09:56.000000000
> +0100
> +++ lps-3.1-src/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> compiler/ScriptElementCompiler.java 2005-11-11 11:48:52.000000000
> +0100
> @@ -33,7 +33,7 @@
> }
>
> public void compile(Element element) {
> - if (element.hasChildren()) {
> + if (!element.getChildren().isEmpty()) {
> throw new CompilationError("<script> elements can't
> have children",
> element);
> }
> diff -r -U 3 lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/
> openlaszlo/compiler/SourceLocatorSAXOutputter.java lps-3.1-src/
> lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/compiler/
> SourceLocatorSAXOutputter.java
> --- lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> compiler/SourceLocatorSAXOutputter.java 2005-11-02
> 01:09:57.000000000 +0100
> +++ lps-3.1-src/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> compiler/SourceLocatorSAXOutputter.java 2005-11-11
> 11:41:45.000000000 +0100
> @@ -483,7 +483,7 @@
> */
> private String getAttributeTypeName(int type) {
> if ((type < 0) || (type >= attrTypeToNameMap.length)) {
> - type = Attribute.UNDECLARED_ATTRIBUTE;
> + type = Attribute.UNDECLARED_TYPE;
> }
> return attrTypeToNameMap[type];
> }
> diff -r -U 3 lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/
> openlaszlo/compiler/ViewSchema.java lps-3.1-src/lps-3.1/WEB-INF/lps/
> server/src/org/openlaszlo/compiler/ViewSchema.java
> --- lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> compiler/ViewSchema.java 2005-11-02 01:09:56.000000000 +0100
> +++ lps-3.1-src/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> compiler/ViewSchema.java 2005-11-11 11:31:50.000000000 +0100
> @@ -481,7 +481,7 @@
> </choice>
> */
>
> - Element parent = superclassDef.getParent();
> + Element parent = superclassDef.getParentElement();
> if (parent.getName().equals("choice"))
> parent.addContent(myclassDef);
> else {
> @@ -826,7 +826,7 @@
> if (cname.equals("view")) {
> Element p = elt;
> while (p != null) {
> - p = p.getParent();
> + p = p.getParentElement();
> if (p == null) {
> break;
> }
> @@ -947,7 +947,7 @@
> return (ClassModel) mClassMap.get(elementName);
> }
>
> - public void loadSchema() throws JDOMException {
> + public void loadSchema() throws JDOMException, IOException {
> String schemaPath = SCHEMA_PATH;
> // Load the schema if it hasn't been.
> // Reload it if it's been touched, to make it easier for
> developers.
> @@ -968,7 +968,7 @@
> parseSchemaAttributes();
> }
>
> - public Document getSchemaDOM() throws JDOMException {
> + public Document getSchemaDOM() throws JDOMException,
> IOException {
> if (schemaDOM == null) {
> loadSchema();
> }
> diff -r -U 3 lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/
> openlaszlo/compiler/ViewSchema_Test.java lps-3.1-src/lps-3.1/WEB-
> INF/lps/server/src/org/openlaszlo/compiler/ViewSchema_Test.java
> --- lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> compiler/ViewSchema_Test.java 2005-11-02 01:09:55.000000000 +0100
> +++ lps-3.1-src/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> compiler/ViewSchema_Test.java 2005-11-11 11:33:25.000000000 +0100
> @@ -84,6 +84,8 @@
> schema.loadSchema();
> } catch (JDOMException e) {
> throw new RuntimeException(e.getMessage());
> + } catch (IOException e) {
> + throw new RuntimeException(e.getMessage());
> }
>
> String class1 = "mynewclass";
> diff -r -U 3 lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/
> openlaszlo/connection/HTTPConnection.java lps-3.1-src/lps-3.1/WEB-
> INF/lps/server/src/org/openlaszlo/connection/HTTPConnection.java
> --- lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> connection/HTTPConnection.java 2005-11-02 01:09:52.000000000 +0100
> +++ lps-3.1-src/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> connection/HTTPConnection.java 2005-11-11 11:34:05.000000000 +0100
> @@ -695,6 +695,8 @@
> .getRootElement();
> } catch (JDOMException e) {
> mLogger.debug(e.getMessage());
> + } catch (IOException e) {
> + mLogger.debug(e.getMessage());
> }
> return el;
> }
> diff -r -U 3 lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/
> openlaszlo/server/Configuration.java lps-3.1-src/lps-3.1/WEB-INF/
> lps/server/src/org/openlaszlo/server/Configuration.java
> --- lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> server/Configuration.java 2005-11-02 01:09:56.000000000 +0100
> +++ lps-3.1-src/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> server/Configuration.java 2005-11-11 11:34:59.000000000 +0100
> @@ -102,6 +102,9 @@
> } catch (JDOMException e) {
> mLogger.error("jdom exception reading configuration "
> + e.getMessage());
> throw new ChainedException(e.getMessage());
> + } catch (IOException e) {
> + mLogger.error("io exception reading configuration " +
> e.getMessage());
> + throw new ChainedException(e.getMessage());
> }
> }
>
> diff -r -U 3 lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/
> openlaszlo/xml/DataEncoder.java lps-3.1-src/lps-3.1/WEB-INF/lps/
> server/src/org/openlaszlo/xml/DataEncoder.java
> --- lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> xml/DataEncoder.java 2005-11-02 01:09:53.000000000 +0100
> +++ lps-3.1-src/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/xml/
> DataEncoder.java 2005-11-11 11:41:21.000000000 +0100
> @@ -627,16 +627,16 @@
> // thing to pass back for enumerated types.
>
> int type = attr.getAttributeType();
> - if ( type == Attribute.CDATA_ATTRIBUTE) { return
> "CDATA"; }
> - else if ( type == Attribute.ID_ATTRIBUTE) { return
> "ID"; }
> - else if ( type == Attribute.IDREF_ATTRIBUTE) { return
> "IDREF"; }
> - else if ( type == Attribute.IDREFS_ATTRIBUTE) { return
> "IDREFS"; }
> - else if ( type == Attribute.ENTITY_ATTRIBUTE) { return
> "ENTITY"; }
> - else if ( type == Attribute.ENTITIES_ATTRIBUTE) { return
> "ENTITIES"; }
> - else if ( type == Attribute.NMTOKEN_ATTRIBUTE) { return
> "NMTOKEN"; }
> - else if ( type == Attribute.NMTOKENS_ATTRIBUTE) { return
> "NMTOKENS"; }
> - else if ( type == Attribute.NOTATION_ATTRIBUTE) { return
> "NOTATION"; }
> - else if ( type == Attribute.ENUMERATED_ATTRIBUTE) { return
> "ENUMERATED"; }
> + if ( type == Attribute.CDATA_TYPE) { return
> "CDATA"; }
> + else if ( type == Attribute.ID_TYPE) { return "ID"; }
> + else if ( type == Attribute.IDREF_TYPE) { return
> "IDREF"; }
> + else if ( type == Attribute.IDREFS_TYPE) { return
> "IDREFS"; }
> + else if ( type == Attribute.ENTITY_TYPE) { return
> "ENTITY"; }
> + else if ( type == Attribute.ENTITIES_TYPE) { return
> "ENTITIES"; }
> + else if ( type == Attribute.NMTOKEN_TYPE) { return
> "NMTOKEN"; }
> + else if ( type == Attribute.NMTOKENS_TYPE) { return
> "NMTOKENS"; }
> + else if ( type == Attribute.NOTATION_TYPE) { return
> "NOTATION"; }
> + else if ( type == Attribute.ENUMERATED_TYPE) { return
> "ENUMERATED"; }
> else { return ""; }
>
> }
> diff -r -U 3 lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/
> openlaszlo/xml/internal/XMLUtils.java lps-3.1-src/lps-3.1/WEB-INF/
> lps/server/src/org/openlaszlo/xml/internal/XMLUtils.java
> --- lps-3.1-src-orig/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/
> xml/internal/XMLUtils.java 2005-11-02 01:09:55.000000000 +0100
> +++ lps-3.1-src/lps-3.1/WEB-INF/lps/server/src/org/openlaszlo/xml/
> internal/XMLUtils.java 2005-11-11 11:38:19.000000000 +0100
> @@ -8,12 +8,14 @@
> * J_LZ_COPYRIGHT_END
> *********************************************************/
>
> package org.openlaszlo.xml.internal;
> -import org.openlaszlo.utils.ChainedException;
> +import java.io.IOException;
> +import java.io.StringReader;
> +
> import org.jdom.Document;
> import org.jdom.Element;
> +import org.jdom.output.Format.TextMode;
> +import org.openlaszlo.utils.ChainedException;
> import org.xml.sax.SAXException;
> -import java.io.*;
> -import java.util.*;
>
> /**
> * XMLUtils
> @@ -210,7 +212,7 @@
> public static String toString(Element element) {
> org.jdom.output.XMLOutputter outputter =
> new org.jdom.output.XMLOutputter();
> - outputter.setTextNormalize(true);
> + outputter.getFormat().setTextMode(TextMode.NORMALIZE);
> return outputter.outputString(element);
> }
>
> @@ -218,7 +220,7 @@
> * Helper function for getXPathTo
> */
> private static StringBuffer getXPathToInternal(Element elt) {
> - Element parent = elt.getParent();
> + Element parent = elt.getParentElement();
> if (parent == null) {
> return new StringBuffer("/*[1]");
> }
> Only in lps-3.1-src/lps-3.1/WEB-INF/lps: work
> diff -r -U 3 lps-3.1-src-orig/lps-3.1/build.xml lps-3.1-src/lps-3.1/
> build.xml
> --- lps-3.1-src-orig/lps-3.1/build.xml 2005-11-02
> 01:09:55.000000000 +0100
> +++ lps-3.1-src/lps-3.1/build.xml 2005-11-11 14:01:57.000000000 +0100
> @@ -540,17 +540,17 @@
> description="Build documentation"
> depends="init" unless="done.doc">
>
> - <!-- Build the LZX reference -->
> + <!-- Build the LZX reference
> <ant dir="docs/src" target="build" />
> -
> - <!-- Build the public javadocs -->
> + -->
> + <!-- Build the public javadocs
> <ant dir="WEB-INF/lps/server" target="javadoc-public" />
> -
> + -->
> <!-- Build the lzx file catalogs -->
> - <!--Uncommend when we know it works on all platforms
> + <!--Uncommend when we know it works on all platforms
> +
> <ant target="lzx-catalog" />
> - -->
> -
> +-->
> <property name="done.doc" value="true" />
> </target>
>
> @@ -891,6 +891,11 @@
>
> <!--================ Target [prefetch] ==============-->
> <target name="prefetch" depends="init" description="Prefetch
> shipping lzx apps" unless="skip.prefetch" >
> + <chmod perm="755">
> + <fileset dir="build-tools" id="id">
> + <include name="*.sh"/>
> + </fileset>
> + </chmod>
> <exec executable="bash" failonerror="true">
> <arg line="-c 'build-tools/prefetch.sh lps-${version.id}
> Server/${tomcat}'" />
> </exec>
> _______________________________________________
> Laszlo-dev mailing list
> Laszlo-dev at openlaszlo.org
> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
More information about the Laszlo-dev
mailing list