Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 22262 invoked by uid 500); 3 Dec 2002 08:59:03 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 22249 invoked from network); 3 Dec 2002 08:59:02 -0000 X-Envelope-Sender-Is: Lars.Kirchhoff@wincor-nixdorf.com (at relayer david-wn.wincor-nixdorf.com) Message-ID: From: "Kirchhoff, Lars" To: "'cocoon-users@xml.apache.org'" Subject: Re: XMLForm and Table output Date: Tue, 3 Dec 2002 16:59:01 +0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Can somebody explain me why there are two stylesheets used for=20 the transformation in the XMLWizard Howto example? What is the reason to separate the transformation in two different files? Lars > -----Urspr=FCngliche Nachricht----- > Von: Kirchhoff, Lars=20 > Gesendet: Dienstag, 3. Dezember 2002 12:58 > An: 'cocoon-users@xml.apache.org' > Betreff: Re: XMLForm and Table output >=20 >=20 > I mean NOW I can access the dom.. >=20 > > -----Urspr=FCngliche Nachricht----- > > Von: Kirchhoff, Lars=20 > > Gesendet: Dienstag, 3. Dezember 2002 12:54 > > An: 'cocoon-users@xml.apache.org' > > Betreff: AW: XMLForm and Table output > >=20 > >=20 > > no I didn't, but I forget to set the get and set method in=20 > > the JavaBean. > > No I can access the dom with the following: > >=20 > > > > Username: > > > > > > > > =09 > > =09 > > Userlist: > > > > > class=3D"info"> > > > class=3D"info"> > > > > > > =09 > >=20 > > but the funny thing is, that I only can access the first=20 > > element. I > > don't=20 > > get all elements. > >=20 > > > -----Urspr=FCngliche Nachricht----- > > > Von: Ivelin Ivanov [mailto:ivelin@apache.org] > > > Gesendet: Dienstag, 3. Dezember 2002 12:05 > > > An: cocoon-users@xml.apache.org > > > Betreff: Re: XMLForm and Table output > > >=20 > > >=20 > > > Did you try setting your form model as a DocumentContainer=20 > > > which contains > > > the DOM object? > > >=20 > > >=20 > http://jakarta.apache.org/commons/jxpath/users-guide.html#Containers > > >=20 > > >=20 > > >=20 > > >=20 > > > ----- Original Message ----- > > > From: "Kirchhoff, Lars" > > > To: > > > Sent: Monday, December 02, 2002 8:35 PM > > > Subject: AW: XMLForm and Table output > > >=20 > > >=20 > > > maybe I was a bit unprecise. I already could see that the xml=20 > > > output is > > > correct. > > > the only thing I'm still not sure is how to reference the dom=20 > > > in the xml > > > page. > > > I tried the following: > > > > > > > > > > > > > > > > > > > > >=20 > > > and > > >=20 > > > > > > Usernames: > > > > > > > > > > > > > > > > > > > > > > > >=20 > > > and several others ... (but this seemed to be the most=20 > logical ones > > > after reading the xmlform specs from w3c) > > >=20 > > > but it's not working. Now my guess is that probably the=20 > data is not > > > return probaply to the xml page or better the pipeline. In=20 > > the action > > > java file I have this getForm().getModel(); statement and am now > > > wondering if this returns all Data, not only the bean data? > > >=20 > > > maybe you can help finding the light out of this... > > >=20 > > > ciao Lars > > >=20 > > > > -----Urspr=FCngliche Nachricht----- > > > > Von: Ivelin Ivanov [mailto:ivelin@apache.org] > > > > Gesendet: Dienstag, 3. Dezember 2002 10:00 > > > > An: cocoon-users@xml.apache.org > > > > Betreff: Re: XMLForm and Table output > > > > > > > > > > > > I am not sure what exactly the problem is, > > > > but I guess you might be actually looking for a file reader=20 > > > instead of > > > > generator. > > > > > > > > I have not really used Cocoon for printing. > > > > > > > > Ivelin > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Kirchhoff, Lars" > > > > To: > > > > Sent: Monday, December 02, 2002 12:15 AM > > > > Subject: AW: XMLForm and Table output > > > > > > > > > > > > thanks Ivelin, > > > > > > > > but now I'm right in front of a new problem, how to print out > > > > the document > > > > using > > > > cocoon? I couldn't find a generator that gets the input right > > > > from a stream? > > > > Do I have to write my own generator? If yes, can you point=20 > > > me to some > > > > documentation > > > > about this, because I couldn't found it. > > > > > > > > thanks Lars > > > > > > > > > -----Urspr=FCngliche Nachricht----- > > > > > Von: Ivelin Ivanov [mailto:ivelin@apache.org] > > > > > Gesendet: Sonntag, 1. Dezember 2002 00:03 > > > > > An: cocoon-users@xml.apache.org > > > > > Betreff: Re: XMLForm and Table output > > > > > > > > > > > > > > > Yes. You are on the right track. > > > > > Why don't you print the XML document once it is created to > > > > see what it > > > > > actually contains. > > > > > I suspect this might be a simple mistake due to misuse of the > > > > > API. It is not > > > > > very convenient. > > > > > Actually if you plan writing a lot of DOM code, you may want > > > > > to look at JDOM > > > > > or some of the O/R mapping frameworks. > > > > > > > > > > > > > > > Ivelin > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Kirchhoff, Lars" > > > > > To: "Cocoon-Users (E-Mail)" > > > > > Sent: Thursday, November 28, 2002 4:49 AM > > > > > Subject: XMLForm and Table output > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > it's me again and I hope I'm still getting answers and not > > > > > starting to > > > > > > bother you all > > > > > > with all my questions. > > > > > > I've tried to create an application which simple should get > > > > > some user data > > > > > > from a > > > > > > database, by simply enter the name. So my first form is > > > > > just a text field > > > > > > where the name > > > > > > can be inserted. If the name is found all data will be > > > > > shown. so far so > > > > > > good. But now > > > > > > I would like to built something more. Because I do not look > > > > > at the exact > > > > > > name in the > > > > > > database it could be possible to get more then one entry. I > > > > > now want to > > > > > > create a page, > > > > > > where all possible names are shown and some more additional > > > > > information > > > > > > about them. > > > > > > So what I would like to have should be looking like this: > > > > > > ---------------------------------------------- > > > > > > | name | address | city | zip | > > > > > > ---------------------------------------------- > > > > > > | name1 | address1 | city1 | zip1 | > > > > > > | name2 | address2 | city2 | zip2 | > > > > > > | name3 | address3 | city3 | zip3 | > > > > > > | ... | ... | ... | ... | > > > > > > > > > > > > where the user has the possibility to click on the a name > > > > > to get the full > > > > > > detail. > > > > > > So what I thought is to write a method which get me the > > > > > data from the > > > > > > database and > > > > > > put this in a DOM Nodes. I thought this would enable me to > > > > > use them in the > > > > > > > > > > > > statement, but unfortunately it didn't worked out so far. > > > > > > > > > > > > Here is the code I used to create the DOM Nodes: > > > > > > > > > > > = -------------------------------------------------------------- > > > > > ------------ > > > > > -- > > > > > > --------------- > > > > > > //=20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D > > > > > > // Use DOM nodes to store values > > > > > > //=20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D > > > > > > DOMImplementation impl; > > > > > > > > > > > > try { > > > > > > DocumentBuilderFactory factory =3D > > > > > > DocumentBuilderFactory.newInstance(); > > > > > > factory.setNamespaceAware( false ); > > > > > > factory.setValidating( false ); > > > > > > DocumentBuilder builder =3D factory.newDocumentBuilder(); > > > > > > impl =3D builder.getDOMImplementation(); > > > > > > } > > > > > > catch ( Exception e ) { > > > > > > throw new RuntimeException( "Failed to initialize DOM > > > > factory. Root > > > > > > cause: \n" + e ); > > > > > > } > > > > > > > > > > > > //=20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D > > > > > > // Use DOM nodes to store values > > > > > > //=20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D > > > > > > Document doc =3D impl.createDocument( null, "Users", null = ); > > > > > > Node root =3D doc.getDocumentElement(); > > > > > > Node custname =3D null; > > > > > > Node address =3D null; > > > > > > Node zip =3D null; > > > > > > Node city =3D null; > > > > > > Node user =3D null; > > > > > > Text text; > > > > > > > > > > > > try { > > > > > > Class.forName( "org.postgresql.Driver" ); > > > > > > Connection con =3D > > > > > > DriverManager.getConnection( DB_URL, DB_USER, DB_PASS ); > > > > > > Statement stmt =3D con.createStatement(); > > > > > > String update =3D "select custname, busname, > > > > > > address, city, state, zip, pobox, pocode from customer > > > > > where custname like > > > > > > '%" + name + "%'"; > > > > > > ResultSet rs =3D stmt.executeQuery( update > > > > > > ); > > > > > > > > > > > > while ( rs.next() ) { > > > > > > user =3D doc.createElement( "user" ); > > > > > > root.appendChild( user ); > > > > > > > > > > > > custname =3D doc.createElement( "custname" ); > > > > > > > > > > > > text =3D doc.createTextNode( rs.getString( > > > > > > "custname" ) ); > > > > > > custname.appendChild( text ); > > > > > > user.appendChild( custname ); > > > > > > > > > > > > address =3D doc.createElement( "address" ); > > > > > > > > > > > > text =3D doc.createTextNode( rs.getString( > > > > > > "address" ) ); > > > > > > address.appendChild( text ); > > > > > > user.appendChild( address ); > > > > > > > > > > > > zip =3D doc.createElement( "zip" ); > > > > > > > > > > > > text =3D doc.createTextNode( rs.getString( "zip" ) > > > > > > ); > > > > > > zip.appendChild( text ); > > > > > > user.appendChild( zip ); > > > > > > > > > > > > city =3D doc.createElement( "city" ); > > > > > > > > > > > > text =3D doc.createTextNode( rs.getString( "city" ) > > > > > > ); > > > > > > city.appendChild( text ); > > > > > > user.appendChild( city ); > > > > > > > > > > > > system =3D root; > > > > > > } > > > > > > } > > > > > > catch( Exception e ) { } > > > > > > > > > > > = -------------------------------------------------------------- > > > > > ------------ > > > > > -- > > > > > > --------------- > > > > > > > > > > > > I expected to create the following structure with it: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > >
> > > > > >
> > > > > > > > > > > > So what I'm now wondering is, if I'm on the right track and > > > > > just doing > > > > > some > > > > > > beginner mistakes > > > > > > or if this won't work at all. > > > > > > > > > > > > Thanks in advance that you read up to here. > > > > > > > > > > > > ciao Lars > > > > > > > > > > > > > > > > > > > > >=20 > > >=20 > >=20 > --------------------------------------------------------------------- > > > > > > Please check that your question has not already been > > > > > answered in the > > > > > > FAQ before posting. > > > > > > > > > > > > > > > > > To unsubscribe, e-mail: > > > > > > > > > > > For additional commands, e-mail: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >=20 > > >=20 > >=20 > --------------------------------------------------------------------- > > > > > Please check that your question has not already been > > > > answered in the > > > > > FAQ before posting. > > > > > > > > > > > > > > To unsubscribe, e-mail: > > > > > > > > > For additional commands, e-mail: > > > > > > > > > > > > > > > > >=20 > > >=20 > >=20 > --------------------------------------------------------------------- > > > > Please check that your question has not already been=20 > > > answered in the > > > > FAQ before posting. =20 > > > > > > > > > > > To unsubscribe, e-mail: =20 > > > > > > > For additional commands, e-mail: =20 > > > > > > > > > > > > > > > > > > >=20 > > >=20 > >=20 > --------------------------------------------------------------------- > > > > Please check that your question has not already been=20 > > > answered in the > > > > FAQ before posting. =20 > > > > > > > > > > > To unsubscribe, e-mail: =20 > > > > > > > For additional commands, e-mail: =20 > > > > > > > > > >=20 > > >=20 > >=20 > --------------------------------------------------------------------- > > > Please check that your question has not already been=20 > > answered in the > > > FAQ before posting. =20 > > >=20 > > To unsubscribe, e-mail: =20 > > > For additional commands, e-mail: =20 > > >=20 > >=20 > >=20 > >=20 > --------------------------------------------------------------------- > > Please check that your question has not already been=20 > answered in the > > FAQ before posting. =20 > > >=20 > > To unsubscribe, e-mail: =20 > > > For additional commands, e-mail: =20 > > >=20 >=20 > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. >=20 > To unsubscribe, e-mail: > For additional commands, e-mail: >=20 > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. >=20 > To unsubscribe, e-mail: > For additional commands, e-mail: >=20 --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: