[jdom-interest] Toward beta 9

Bradley S. Huffman hip at a.cs.okstate.edu
Wed Apr 9 13:32:26 PDT 2003


In the jdom-interest archives at

    http://www.servlets.com/archive/servlet/ReadMsg?msgId=218029

you'll find the code already done (go over though cause I think there's a
small bug in one of the attribute creation methods).

Brad

Rolf Lear writes:

> This message is in MIME format. Since your mail reader does not understand
> this format, some or all of this message may not be legible.
> 
> ------_=_NextPart_000_01C2FED4.EB3F457F
> Content-Type: multipart/alternative;
> 	boundary="----_=_NextPart_001_01C2FED4.EB3F457F"
> 
> 
> ------_=_NextPart_001_01C2FED4.EB3F457F
> Content-Type: text/plain;
> 	charset="iso-8859-1"
> 
> Figured I would have a go...
> 
> Best scheme I could think of was to Add a new JDOM Factory.
> 
> I have not tested it, but the following code/philosophy should work.
> 
> Benefits: Once object (Attribute/element/etc) is created, changes to the
> data will be verified.
>           NO IMPACT ON EXISTING CODE.
> Drawbacks: Once object (Attribute/element/etc) is created, changes to the
> data will be verified.
> 
> Basic principal: Current scheme is to build the JDOM representation using a
> JDOMFactory. This is implemented by the DefaultJDOMfactory. This factory
> creates "standard/Verified" Elements, Attributes, etc. I create an alternate
> factory, the "LaxJDOMFactory" which creates LaxElements, LaxAttributes, etc.
> LaxElement extends Element, overriding ONLY THE CONSTRUCTOR, so that
> Verification does not happen ONLY ON CONSTRUCTION.
> 
> Any Cloning, manipulation, detaching, etc will be done on the base class.
> 
> To use the Lax mechanism, you would have to:
> 
> SAXBuilder builder = new SAXBuilder();
> builder.setFactory(new LaxJDOMFactory());
> builder.build(.....).
> 
> Thus, attached are:
> org.jdom.inpu.lax.LaxJDOMFactory
> org.jdom.inpu.lax.LaxText
> org.jdom.inpu.lax.LaxElement
> org.jdom.inpu.lax.LaxAttribute
> org.jdom.inpu.lax.LaxCDATA
> org.jdom.inpu.lax.LaxComment
> org.jdom.inpu.lax.LaxEntityRef
> 
> 
> Rolf
> 
> 
> -----Original Message-----
> From: Rolf Lear [mailto:rlear at algorithmics.com]
> Sent: Wednesday, April 09, 2003 2:40 PM
> To: jdom-interest
> Subject: RE: [jdom-interest] Toward beta 9
> 
> 
> Please hack it then, and post the patch for analysis ... ;-) (preferably
> with performance deltas). 
> Rolf 
> -----Original Message----- 
> From: Steve Conover [mailto:sgcjr at yahoo.com] 
> Sent: Wednesday, April 09, 2003 2:36 PM 
> To: jdom-interest 
> Subject: Re: [jdom-interest] Toward beta 9 
> 
> 
> > My proposed solution was to make the verifier a separate, optional 
> > step. When the user creates a document in-memory (as opposed to 
> > parsing 
> > a file), then should run the verifier on it when they're done. Many 
> > people won't do this, and that's their prerogative, but at some point 
> > down the line some XML parser will find the error when their document 
> > gets parsed, so it's not the end of the world. (That's why the parser 
> > is 
> > required to be so strict, IMO - so the generator doesn't have to be.) 
> Just to add a user's opinion - I'm in complete agreement with Alex. 
> The code I'm writing is 100% unit tested and the verifier step is just 
> wasted cpu cycles.  If JDOM is delivered like this I for one will just 
> hack it and make it verification-optional. 
> Regards, 
> Steve 
> _______________________________________________ 
> To control your jdom-interest membership: 
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
> t.com 
> 
> 
> ------_=_NextPart_001_01C2FED4.EB3F457F
> Content-Type: text/html;
> 	charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
> 
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
> <HTML>
> <HEAD>
> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
> charset=3Diso-8859-1">
> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
> 5.5.2655.35">
> <TITLE>RE: [jdom-interest] Toward beta 9</TITLE>
> </HEAD>
> <BODY>
> 
> <P><FONT SIZE=3D2>Figured I would have a go...</FONT>
> </P>
> 
> <P><FONT SIZE=3D2>Best scheme I could think of was to Add a new JDOM =
> Factory.</FONT>
> </P>
> 
> <P><FONT SIZE=3D2>I have not tested it, but the following =
> code/philosophy should work.</FONT>
> </P>
> 
> <P><FONT SIZE=3D2>Benefits: Once object (Attribute/element/etc) is =
> created, changes to the data will be verified.</FONT>
> <BR><FONT =
> SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NO =
> IMPACT ON EXISTING CODE.</FONT>
> <BR><FONT SIZE=3D2>Drawbacks: Once object (Attribute/element/etc) is =
> created, changes to the data will be verified.</FONT>
> </P>
> 
> <P><FONT SIZE=3D2>Basic principal: Current scheme is to build the JDOM =
> representation using a JDOMFactory. This is implemented by the =
> DefaultJDOMfactory. This factory creates &quot;standard/Verified&quot; =
> Elements, Attributes, etc. I create an alternate factory, the =
> &quot;LaxJDOMFactory&quot; which creates LaxElements, LaxAttributes, =
> etc. LaxElement extends Element, overriding ONLY THE CONSTRUCTOR, so =
> that Verification does not happen ONLY ON CONSTRUCTION.</FONT></P>
> 
> <P><FONT SIZE=3D2>Any Cloning, manipulation, detaching, etc will be =
> done on the base class.</FONT>
> </P>
> 
> <P><FONT SIZE=3D2>To use the Lax mechanism, you would have to:</FONT>
> </P>
> 
> <P><FONT SIZE=3D2>SAXBuilder builder =3D new SAXBuilder();</FONT>
> <BR><FONT SIZE=3D2>builder.setFactory(new LaxJDOMFactory());</FONT>
> <BR><FONT SIZE=3D2>builder.build(.....).</FONT>
> </P>
> 
> <P><FONT SIZE=3D2>Thus, attached are:</FONT>
> <BR><FONT SIZE=3D2>org.jdom.inpu.lax.LaxJDOMFactory</FONT>
> <BR><FONT SIZE=3D2>org.jdom.inpu.lax.LaxText</FONT>
> <BR><FONT SIZE=3D2>org.jdom.inpu.lax.LaxElement</FONT>
> <BR><FONT SIZE=3D2>org.jdom.inpu.lax.LaxAttribute</FONT>
> <BR><FONT SIZE=3D2>org.jdom.inpu.lax.LaxCDATA</FONT>
> <BR><FONT SIZE=3D2>org.jdom.inpu.lax.LaxComment</FONT>
> <BR><FONT SIZE=3D2>org.jdom.inpu.lax.LaxEntityRef</FONT>
> </P>
> <BR>
> 
> <P><FONT SIZE=3D2>Rolf</FONT>
> </P>
> <BR>
> 
> <P><FONT SIZE=3D2>-----Original Message-----</FONT>
> <BR><FONT SIZE=3D2>From: Rolf Lear [<A =
> HREF=3D"mailto:rlear at algorithmics.com">mailto:rlear at algorithmics.com</A>=
> ]</FONT>
> <BR><FONT SIZE=3D2>Sent: Wednesday, April 09, 2003 2:40 PM</FONT>
> <BR><FONT SIZE=3D2>To: jdom-interest</FONT>
> <BR><FONT SIZE=3D2>Subject: RE: [jdom-interest] Toward beta 9</FONT>
> </P>
> <BR>
> 
> <P><FONT SIZE=3D2>Please hack it then, and post the patch for analysis =
> ... ;-) (preferably with performance deltas). </FONT>
> <BR><FONT SIZE=3D2>Rolf </FONT>
> <BR><FONT SIZE=3D2>-----Original Message----- </FONT>
> <BR><FONT SIZE=3D2>From: Steve Conover [<A =
> HREF=3D"mailto:sgcjr at yahoo.com">mailto:sgcjr at yahoo.com</A>] </FONT>
> <BR><FONT SIZE=3D2>Sent: Wednesday, April 09, 2003 2:36 PM </FONT>
> <BR><FONT SIZE=3D2>To: jdom-interest </FONT>
> <BR><FONT SIZE=3D2>Subject: Re: [jdom-interest] Toward beta 9 </FONT>
> </P>
> <BR>
> 
> <P><FONT SIZE=3D2>&gt; My proposed solution was to make the verifier a =
> separate, optional </FONT>
> <BR><FONT SIZE=3D2>&gt; step. When the user creates a document =
> in-memory (as opposed to </FONT>
> <BR><FONT SIZE=3D2>&gt; parsing </FONT>
> <BR><FONT SIZE=3D2>&gt; a file), then should run the verifier on it =
> when they're done. Many </FONT>
> <BR><FONT SIZE=3D2>&gt; people won't do this, and that's their =
> prerogative, but at some point </FONT>
> <BR><FONT SIZE=3D2>&gt; down the line some XML parser will find the =
> error when their document </FONT>
> <BR><FONT SIZE=3D2>&gt; gets parsed, so it's not the end of the world. =
> (That's why the parser </FONT>
> <BR><FONT SIZE=3D2>&gt; is </FONT>
> <BR><FONT SIZE=3D2>&gt; required to be so strict, IMO - so the =
> generator doesn't have to be.) </FONT>
> <BR><FONT SIZE=3D2>Just to add a user's opinion - I'm in complete =
> agreement with Alex. </FONT>
> <BR><FONT SIZE=3D2>The code I'm writing is 100% unit tested and the =
> verifier step is just </FONT>
> <BR><FONT SIZE=3D2>wasted cpu cycles.&nbsp; If JDOM is delivered like =
> this I for one will just </FONT>
> <BR><FONT SIZE=3D2>hack it and make it verification-optional. </FONT>
> <BR><FONT SIZE=3D2>Regards, </FONT>
> <BR><FONT SIZE=3D2>Steve </FONT>
> <BR><FONT SIZE=3D2>_______________________________________________ =
> </FONT>
> <BR><FONT SIZE=3D2>To control your jdom-interest membership: </FONT>
> <BR><FONT SIZE=3D2><A =
> HREF=3D"http://lists.denveronline.net/mailman/options/jdom-interest/your=
> addr at yourhost.com" =
> TARGET=3D"_blank">http://lists.denveronline.net/mailman/options/jdom-int=
> erest/youraddr at yourhost.com</A> </FONT>
> </P>
> 
> <P><FONT FACE=3D"Arial" SIZE=3D2 COLOR=3D"#000000"></FONT><FONT =
> FACE=3D"Arial" SIZE=3D2 COLOR=3D"#000000"></FONT><FONT FACE=3D"Arial" =
> SIZE=3D2 COLOR=3D"#000000"></FONT><FONT FACE=3D"Arial" SIZE=3D2 =
> COLOR=3D"#000000"></FONT><FONT FACE=3D"Arial" SIZE=3D2 =
> COLOR=3D"#000000"></FONT><FONT FACE=3D"Arial" SIZE=3D2 =
> COLOR=3D"#000000"></FONT><FONT FACE=3D"Arial" SIZE=3D2 =
> COLOR=3D"#000000"></FONT>&nbsp;
> 
> </BODY>
> </HTML>
> ------_=_NextPart_001_01C2FED4.EB3F457F--
> 
> ------_=_NextPart_000_01C2FED4.EB3F457F
> Content-Type: application/octet-stream;
> 	name="LaxAttribute.java"
> Content-Disposition: attachment;
> 	filename="LaxAttribute.java"
> 
> package org.jdom.input.lax;
> 
> import org.jdom.Attribute;
> import org.jdom.Namespace;
> 
> /**
>  * @author rlear
>  *
>  * Date Apr 9, 2003
>  */
> public class LaxAttribute extends Attribute {
>     
>     
> 
>     /**
>      * disable.
>      * Constructor for LaxAttribute.
>      */
>     private LaxAttribute() {}
> 
>     /**
>      * Constructor for LaxAttribute.
>      * @param name
>      * @param value
>      * @param namespace
>      */
>     public LaxAttribute(String name, String value, Namespace namespace) {
>         this.name = name;
>         this.value = value;
>         setNamespace(namespace);
>     }
> 
>     /**
>      * Constructor for LaxAttribute.
>      * @param name
>      * @param value
>      * @param type
>      * @param namespace
>      */
>     public LaxAttribute(String name, String value, int type, Namespace namesp
> ace) {
>         this.name = name;
>         this.value = value;
>         setAttributeType(type);
>         setNamespace(namespace);
>     }
> 
>     /**
>      * Constructor for LaxAttribute.
>      * @param name
>      * @param value
>      */
>     public LaxAttribute(String name, String value) {
>         this.name = name;
>         this.value = value;
>     }
> 
>     /**
>      * Constructor for LaxAttribute.
>      * @param name
>      * @param value
>      * @param type
>      */
>     public LaxAttribute(String name, String value, int type) {
>         this.name = name;
>         this.value = value;
>         setAttributeType(type);
>     }
>     
> }
> 
> ------_=_NextPart_000_01C2FED4.EB3F457F
> Content-Type: application/octet-stream;
> 	name="LaxCDATA.java"
> Content-Disposition: attachment;
> 	filename="LaxCDATA.java"
> 
> package org.jdom.input.lax;
> 
> import org.jdom.CDATA;
> 
> /**
>  * @author rlear
>  *
>  * Date Apr 9, 2003
>  */
> public class LaxCDATA extends CDATA {
> 
>     /**
>      * Constructor for LaxCDATA.
>      * @param str
>      */
>     public LaxCDATA(String str) {
>         // Maybe make EMPTY_STRING protected on CDATA?
>         this.value = (str == null ? "" : str);
>     }
> 
> }
> 
> ------_=_NextPart_000_01C2FED4.EB3F457F
> Content-Type: application/octet-stream;
> 	name="LaxComment.java"
> Content-Disposition: attachment;
> 	filename="LaxComment.java"
> 
> package org.jdom.input.lax;
> 
> import org.jdom.Comment;
> 
> /**
>  * @author rlear
>  *
>  * Date Apr 9, 2003
>  */
> public class LaxComment extends Comment {
> 
>     /**
>      * Constructor for LaxComment.
>      * @param text
>      */
>     public LaxComment(String text) {
>         this.text = text;
>     }
> 
> }
> 
> ------_=_NextPart_000_01C2FED4.EB3F457F
> Content-Type: application/octet-stream;
> 	name="LaxElement.java"
> Content-Disposition: attachment;
> 	filename="LaxElement.java"
> 
> package org.jdom.input.lax;
> 
> import org.jdom.Element;
> import org.jdom.Namespace;
> 
> /**
>  * @author rlear
>  *
>  * Date Apr 9, 2003
>  */
> public class LaxElement extends Element {
> 
>     /**
>      * This will create a new <code>Element</code>
>      * with the supplied (local) name, and define
>      * the <code>{@link Namespace}</code> to be used.
>      * If the provided namespace is null, the element will have
>      * no namespace.
>      *
>      * @param name <code>String</code> name of element.
>      * @param namespace <code>Namespace</code> to put element in.
>      * @throws IllegalNameException if the given name is illegal as an
>      *         element name.
>      */
>     public LaxElement(String name, Namespace namespace) {
>         this.name = name;
>         setNamespace(namespace);
>     }
> 
> 
> }
> 
> ------_=_NextPart_000_01C2FED4.EB3F457F
> Content-Type: application/octet-stream;
> 	name="LaxEntityRef.java"
> Content-Disposition: attachment;
> 	filename="LaxEntityRef.java"
> 
> package org.jdom.input.lax;
> 
> import org.jdom.EntityRef;
> 
> /**
>  * @author rlear
>  *
>  * Date Apr 9, 2003
>  */
> public class LaxEntityRef extends EntityRef {
> 
> 
>     /**
>      * Constructor for LaxEntityRef.
>      * @param name
>      * @param publicID
>      * @param systemID
>      */
>     public LaxEntityRef(String name, String publicID, String systemID) {
>         this.name = name;
>         this.publicID = publicID;
>         this.systemID = systemID;
>     }
> 
> }
> 
> ------_=_NextPart_000_01C2FED4.EB3F457F
> Content-Type: application/octet-stream;
> 	name="LaxJDOMFactory.java"
> Content-Transfer-Encoding: quoted-printable
> Content-Disposition: attachment;
> 	filename="LaxJDOMFactory.java"
> 
> /*--=0A=
> =0A=
>  $Id: LaxJDOMFactory.java,v 1.10 2003/04/06 02:00:44 jhunter Exp $=0A=
> =0A=
>  Copyright (C) 2000 Jason Hunter & Brett McLaughlin.=0A=
>  All rights reserved.=0A=
> =0A=
>  Redistribution and use in source and binary forms, with or without=0A=
>  modification, are permitted provided that the following conditions=0A=
>  are met:=0A=
> =0A=
>  1. Redistributions of source code must retain the above copyright=0A=
>     notice, this list of conditions, and the following disclaimer.=0A=
> =0A=
>  2. Redistributions in binary form must reproduce the above =
> copyright=0A=
>     notice, this list of conditions, and the disclaimer that follows=0A=
>     these conditions in the documentation and/or other materials=0A=
>     provided with the distribution.=0A=
> =0A=
>  3. The name "JDOM" must not be used to endorse or promote products=0A=
>     derived from this software without prior written permission.  =
> For=0A=
>     written permission, please contact <request_AT_jdom_DOT_org>.=0A=
> =0A=
>  4. Products derived from this software may not be called "JDOM", =
> nor=0A=
>     may "JDOM" appear in their name, without prior written =
> permission=0A=
>     from the JDOM Project Management <request_AT_jdom_DOT_org>.=0A=
> =0A=
>  In addition, we request (but do not require) that you include in =
> the=0A=
>  end-user documentation provided with the redistribution and/or in =
> the=0A=
>  software itself an acknowledgement equivalent to the following:=0A=
>      "This product includes software developed by the=0A=
>       JDOM Project (http://www.jdom.org/)."=0A=
>  Alternatively, the acknowledgment may be graphical using the logos=0A=
>  available at http://www.jdom.org/images/logos.=0A=
> =0A=
>  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED=0A=
>  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES=0A=
>  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE=0A=
>  DISCLAIMED.  IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT=0A=
>  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,=0A=
>  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT=0A=
>  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF=0A=
>  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND=0A=
>  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,=0A=
>  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT=0A=
>  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF=0A=
>  SUCH DAMAGE.=0A=
> =0A=
>  This software consists of voluntary contributions made by many=0A=
>  individuals on behalf of the JDOM Project and was originally=0A=
>  created by Jason Hunter <jhunter_AT_jdom_DOT_org> and=0A=
>  Brett McLaughlin <brett_AT_jdom_DOT_org>.  For more information=0A=
>  on the JDOM Project, please see <http://www.jdom.org/>.=0A=
> =0A=
>  */=0A=
> =0A=
> package org.jdom.input.lax;=0A=
> =0A=
> import java.util.*;=0A=
> =0A=
> import org.jdom.*;=0A=
> import org.jdom.input.JDOMFactory;=0A=
> =0A=
> /**=0A=
>  * <code>LaxJDOMFactory</code> creates the standard=0A=
>  * top-level JDOM classes (Element, Document, Comment, etc).=0A=
>  * A subclass of this factory might construct custom classes.=0A=
>  *=0A=
>  * @author Ken Rune Holland=0A=
>  * @author Phil Nelson=0A=
>  * @author Bradley S. Huffman=0A=
>  * @version $Revision: 1.10 $, $Date: 2003/04/06 02:00:44 $=0A=
>  */=0A=
> public class LaxJDOMFactory implements JDOMFactory {=0A=
> =0A=
>     private static final String CVS_ID =3D=0A=
>     "@(#) $RCSfile: LaxJDOMFactory.java,v $ $Revision: 1.10 $ $Date: =
> 2003/04/06 02:00:44 $ $Name:  $";=0A=
> =0A=
>     public LaxJDOMFactory() { }=0A=
> =0A=
>     // Allow Javadocs to inherit from JDOMFactory=0A=
> =0A=
>     public Attribute attribute(String name, String value, Namespace =
> namespace) {=0A=
>         return new LaxAttribute(name, value, namespace);=0A=
>     }=0A=
> =0A=
>     public Attribute attribute(String name, String value,=0A=
>                                             int type, Namespace =
> namespace) {=0A=
>         return new LaxAttribute(name, value, type, namespace);=0A=
>     }=0A=
> =0A=
>     public Attribute attribute(String name, String value) {=0A=
>         return new LaxAttribute(name, value);=0A=
>     }=0A=
> =0A=
>     public Attribute attribute(String name, String value, int type) =
> {=0A=
>         return new LaxAttribute(name, value, type);=0A=
>     }=0A=
> =0A=
>     public CDATA cdata(String text) {=0A=
>         return new LaxCDATA(text);=0A=
>     }=0A=
> =0A=
>     public Text text(String text) {=0A=
>         return new LaxText(text);=0A=
>     }=0A=
> =0A=
>     public Comment comment(String text) {=0A=
>         return new LaxComment(text);=0A=
>     }=0A=
> =0A=
>     public DocType docType(String elementName, =0A=
>                            String publicID, String systemID) {=0A=
>         //Doctype happens once per document... not worth making =
> Lax...=0A=
>         return new DocType(elementName, publicID, systemID);=0A=
>     }=0A=
> =0A=
>     public DocType docType(String elementName, String systemID) {=0A=
>         //Doctype happens once per document... not worth making =
> Lax...=0A=
>         return new DocType(elementName, systemID);=0A=
>     }=0A=
> =0A=
>     public DocType docType(String elementName) {=0A=
>         //Doctype happens once per document... not worth making =
> Lax...=0A=
>         return new DocType(elementName);=0A=
>     }=0A=
> =0A=
>     public Document document(Element rootElement, DocType docType) {=0A=
>         //Document happens once per document... not worth making =
> Lax...=0A=
>         return new Document(rootElement, docType);=0A=
>     }=0A=
> =0A=
>     public Document document(Element rootElement) {=0A=
>         //Document happens once per document... not worth making =
> Lax...=0A=
>         return new Document(rootElement);=0A=
>     }=0A=
> =0A=
>     public Element element(String name, Namespace namespace) {=0A=
>         return new LaxElement(name, namespace);=0A=
>     }=0A=
> =0A=
>     public Element element(String name) {=0A=
>         return new LaxElement(name, null);=0A=
>     }=0A=
> =0A=
>     public Element element(String name, String uri) {=0A=
>         return new LaxElement(name, Namespace.getNamespace("", =
> uri));=0A=
>     }=0A=
> =0A=
>     public Element element(String name, String prefix, String uri) {=0A=
>         return new LaxElement(name, Namespace.getNamespace(prefix, =
> uri));=0A=
>     }=0A=
> =0A=
>     public ProcessingInstruction processingInstruction(String target, =
> =0A=
>                                                        Map data) {=0A=
>         return new ProcessingInstruction(target, data);=0A=
>     }=0A=
> =0A=
>     public ProcessingInstruction processingInstruction(String target, =
> =0A=
>                                                        String data) =
> {=0A=
>         //Processing Instructions are "rarish" ... not worth making =
> Lax...=0A=
>         return new ProcessingInstruction(target, data);=0A=
>     }=0A=
> =0A=
>     public EntityRef entityRef(String name) {=0A=
>         return new LaxEntityRef(name, null, null);=0A=
>     }=0A=
> =0A=
>     public EntityRef entityRef(String name, String publicID, String =
> systemID) {=0A=
>         return new LaxEntityRef(name, publicID, systemID);=0A=
>     }=0A=
> }=0A=
> 
> ------_=_NextPart_000_01C2FED4.EB3F457F
> Content-Type: application/octet-stream;
> 	name="LaxText.java"
> Content-Disposition: attachment;
> 	filename="LaxText.java"
> 
> package org.jdom.input.lax;
> 
> import org.jdom.Text;
> 
> /**
>  * @author rlear
>  *
>  * Date Apr 9, 2003
>  */
> public class LaxText extends Text {
> 
> 
>     /**
>      * Constructor for LaxText.
>      * @param str
>      */
>     public LaxText(String str) {
>         value = (str == null ? "" : str);
>     }
> 
> }
> 
> ------_=_NextPart_000_01C2FED4.EB3F457F--
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost
> .com
> 



More information about the jdom-interest mailing list