Author: gmcdonald Date: Wed May 20 12:03:51 2009 New Revision: 776672 URL: http://svn.apache.org/viewvc?rev=776672&view=rev Log: Alter v20 DTD so xinclude can be used for tr inside a table. Also enhance the seed-sample xinclude example to show the improvement. Suggested by Brolin Emprey, thanks. Fix for FOR-1169
Added: forrest/trunk/main/fresh-site/src/documentation/content/xdocs/samples-b/xinclude-input-sec5.xml (with props) Modified: forrest/trunk/main/fresh-site/src/documentation/content/xdocs/samples-b/xinclude-explanation.xml forrest/trunk/main/fresh-site/src/documentation/content/xdocs/samples-b/xinclude.xml forrest/trunk/main/webapp/resources/schema/dtd/document-v20.mod Modified: forrest/trunk/main/fresh-site/src/documentation/content/xdocs/samples-b/xinclude-explanation.xml URL: http://svn.apache.org/viewvc/forrest/trunk/main/fresh-site/src/documentation/content/xdocs/samples-b/xinclude-explanation.xml?rev=776672&r1=776671&r2=776672&view=diff ============================================================================== --- forrest/trunk/main/fresh-site/src/documentation/content/xdocs/samples-b/xinclude-explanation.xml (original) +++ forrest/trunk/main/fresh-site/src/documentation/content/xdocs/samples-b/xinclude-explanation.xml Wed May 20 12:03:51 2009 @@ -50,6 +50,15 @@ <xi:include parse="text" href="cocoon://samples-b/xinclude-input-sec4.txt"/> </source> </section> + <section> + <title>Section 5</title> + <table> + <xi:include href="cocoon://samples-b/xinclude-input-sec5.xml"/> + <tr> + <td>This <tr> and <td> are native to this file</td> + </tr> + </table> + </section> </body> </document>]]> </source> Added: forrest/trunk/main/fresh-site/src/documentation/content/xdocs/samples-b/xinclude-input-sec5.xml URL: http://svn.apache.org/viewvc/forrest/trunk/main/fresh-site/src/documentation/content/xdocs/samples-b/xinclude-input-sec5.xml?rev=776672&view=auto ============================================================================== --- forrest/trunk/main/fresh-site/src/documentation/content/xdocs/samples-b/xinclude-input-sec5.xml (added) +++ forrest/trunk/main/fresh-site/src/documentation/content/xdocs/samples-b/xinclude-input-sec5.xml Wed May 20 12:03:51 2009 @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<tr> + <td>This <![CDATA[<tr>]]> and <![CDATA[<td>]]> are included from xinclude-input-sec5.xml file</td> + <td>Usage: <![CDATA[<xi:include href="cocoon://samples-b/xinclude-input-sec5.xml"/>]]></td> +</tr> Propchange: forrest/trunk/main/fresh-site/src/documentation/content/xdocs/samples-b/xinclude-input-sec5.xml ------------------------------------------------------------------------------ svn:eol-style = native Modified: forrest/trunk/main/fresh-site/src/documentation/content/xdocs/samples-b/xinclude.xml URL: http://svn.apache.org/viewvc/forrest/trunk/main/fresh-site/src/documentation/content/xdocs/samples-b/xinclude.xml?rev=776672&r1=776671&r2=776672&view=diff ============================================================================== --- forrest/trunk/main/fresh-site/src/documentation/content/xdocs/samples-b/xinclude.xml (original) +++ forrest/trunk/main/fresh-site/src/documentation/content/xdocs/samples-b/xinclude.xml Wed May 20 12:03:51 2009 @@ -37,7 +37,8 @@ Section 1 (the whole section) is included from the xinclude-explanation.xml file. Section 2 (the whole section) is included from the xinclude-input-sec2.xml file. Section 3 (just the "p" elements) are included from the xinclude-input-sec3.xml file using "xpointer". - Section 4 (just the text) is included from the xinclude-input-sec4.txt file. + Section 4 (just the text) is included from the xinclude-input-sec4.txt file. + Section 5 (the first "tr" and containing "td") is included from the xinclude-input-sec5.xml file. </p> <p> Using XInclude in the "site.xml" configuration is also demonstrated. @@ -54,5 +55,14 @@ <title>Section 4</title> <source><xi:include parse="text" href="cocoon://samples-b/xinclude-input-sec4.txt"/></source> </section> + <section> + <title>Section 5</title> + <table> + <xi:include href="cocoon://samples-b/xinclude-input-sec5.xml"/> + <tr> + <td>This <![CDATA[<tr>]]> and <![CDATA[<td>]]> are native to this file</td> + </tr> + </table> + </section> </body> </document> Modified: forrest/trunk/main/webapp/resources/schema/dtd/document-v20.mod URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/resources/schema/dtd/document-v20.mod?rev=776672&r1=776671&r2=776672&view=diff ============================================================================== --- forrest/trunk/main/webapp/resources/schema/dtd/document-v20.mod (original) +++ forrest/trunk/main/webapp/resources/schema/dtd/document-v20.mod Wed May 20 12:03:51 2009 @@ -282,7 +282,7 @@ <!ENTITY % cell.span 'colspan CDATA "1" rowspan CDATA "1"'> <!-- Table element --> -<!ELEMENT table (caption?, tr+)> +<!ELEMENT table (caption?, (tr | xi:include)+)> <!ATTLIST table %common.att; >