tobrien 2003/09/03 19:37:59 Modified: jelly/xdocs tutorial.xml Log: Fixed a rendering problem with the example code in the tutorial page. In the example of embedding Jelly, there were bold tags within the preformatted Java code - Maven's site generation was adding newlines around these bolded variable names. These bold tags were removed, and all code examples now have indentation. Revision Changes Path 1.6 +33 -29 jakarta-commons/jelly/xdocs/tutorial.xml Index: tutorial.xml =================================================================== RCS file: /home/cvs/jakarta-commons/jelly/xdocs/tutorial.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- tutorial.xml 11 Dec 2002 08:32:05 -0000 1.5 +++ tutorial.xml 4 Sep 2003 02:37:59 -0000 1.6 @@ -214,16 +214,16 @@ OutputStream output = new FileOutputStream("demopage.html"); JellyContext context = new JellyContext(); - context.setVariable("<b>name</b>",nameField.getText()); - context.setVariable("<b>background</b>",colorField.getText()); - context.setVariable("<b>url</b>",urlField.getText()); + context.setVariable("name",nameField.getText()); + context.setVariable("background",colorField.getText()); + context.setVariable("url",urlField.getText()); // Set the hobby list Vector v = new Vector(); Enumeration enum= listModel.elements(); while (enum.hasMoreElements()) { v.add(enum.nextElement()); } - context.setVariable("<b>hobbies</b>", v); + context.setVariable("hobbies", v); XMLOutput xmlOutput = XMLOutput.createXMLOutput(output); context.runScript("src/test/org/apache/commons/jelly/demos/"+template), xmlOutput); @@ -235,24 +235,24 @@ </p> <pre> -<?xml version="1.0"?> -<j:jelly trim="false" xmlns:j="jelly:core" xmlns:x="jelly:xml" xmlns:html="jelly:html"> - <html> - <head> - <title>${<b>name</b>}'s Page</title> - </head> - <body bgcolor="${<b>background</b>}" text="#FFFFFF"> - <h1>${<b>name</b>}'s Homepage</h1> - <img src="${<b>url</b>}"/> - <h2>My Hobbies</h2> - <ul> - <j:forEach items="${<b>hobbies</b>}" var="i"> - <li>${i}</li> - </j:forEach> - </ul> - </body> - </html> -</j:jelly> + <?xml version="1.0"?> + <j:jelly trim="false" xmlns:j="jelly:core" xmlns:x="jelly:xml" xmlns:html="jelly:html"> + <html> + <head> + <title>${name}'s Page</title> + </head> + <body bgcolor="${background}" text="#FFFFFF"> + <h1>${name}'s Homepage</h1> + <img src="${url}"/> + <h2>My Hobbies</h2> + <ul> + <j:forEach items="${hobbies}" var="i"> + <li>${i}</li> + </j:forEach> + </ul> + </body> + </html> + </j:jelly> </pre> <p> @@ -278,13 +278,17 @@ </p> <pre> -<html> -<body> -<h1>Output</h1> -<small>James Elson<h2>I am a title!</h2> -<small>Twas a dark, rainy night...</small><p>dfjsdfjsdf</p><p>fdsfsdfhdsff gyuf uysgf ds</p></small> -</body> -</html> + <html> + <body> + <h1>Output</h1> + <small>James Elson + <h2>I am a title!</h2> + <small>Twas a dark, rainy night...</small> + <p>dfjsdfjsdf</p> + <p>fdsfsdfhdsff gyuf uysgf ds</p> + </small> + </body> + </html> </pre> <p>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]