svn commit: r738458 - /maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java

2009-01-28 Thread vsiveton
Author: vsiveton
Date: Wed Jan 28 11:48:21 2009
New Revision: 738458

URL: http://svn.apache.org/viewvc?rev=738458&view=rev
Log:
o improved the CachedFileEntityResolver:
- if the systemId is a file, try to get it as a classpath resource (due to 
r736924)
- wrap IOException into SAXException

Modified:

maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java

Modified: 
maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java?rev=738458&r1=738457&r2=738458&view=diff
==
--- 
maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
 (original)
+++ 
maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
 Wed Jan 28 11:48:21 2009
@@ -22,14 +22,16 @@
 import java.io.BufferedReader;
 import java.io.ByteArrayInputStream;
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
 import java.io.Reader;
 import java.io.StringReader;
 import java.net.URL;
 import java.util.Hashtable;
 import java.util.LinkedHashMap;
+import java.util.Locale;
 import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -695,17 +697,38 @@
 // already cached?
 if ( res == null )
 {
-File temp =
-new File( System.getProperty( "java.io.tmpdir" ), 
FileUtils.getFile( systemId ).getName() );
+String systemName = FileUtils.getFile( systemId ).getName();
+File temp = new File( System.getProperty( "java.io.tmpdir" ), 
systemName );
 // maybe already as a temp file?
 if ( !temp.exists() )
 {
-res = IOUtil.toByteArray( new URL( systemId ).openStream() 
);
-IOUtil.copy( res, new FileOutputStream( temp ) );
+// is systemId a file or an url?
+if ( systemId.toLowerCase( Locale.ENGLISH ).startsWith( 
"file" ) )
+{
+// Doxia XSDs are included in the jars, so try to find 
the resource systemName from
+// the classpath...
+URL url = getClass().getResource( "/" + systemName );
+if ( url != null )
+{
+res = toByteArray( url );
+}
+else
+{
+throw new SAXException( "Could not find the SYSTEM 
entity: " + systemId );
+}
+}
+else
+{
+res = toByteArray( new URL( systemId ) );
+}
+
+// write systemId as temp file
+copy( res, temp );
 }
 else
 {
-res = IOUtil.toByteArray( new FileInputStream( temp ) );
+// TODO How to refresh Doxia XSDs from temp dir?
+res = toByteArray( temp.toURL() );
 }
 
 cache.put( systemId, res );
@@ -717,5 +740,68 @@
 
 return is;
 }
+
+/**
+ * Wrap {...@link IOUtil#toByteArray(java.io.InputStream)} to throw 
SAXException.
+ *
+ * @param url not null
+ * @return return an array of byte
+ * @throws SAXException if any
+ * @see {...@link IOUtil#toByteArray(java.io.InputStream)}
+ */
+private static byte[] toByteArray( URL url )
+throws SAXException
+{
+InputStream is = null;
+try
+{
+is = url.openStream();
+if ( is == null )
+{
+throw new SAXException( "Cannot open stream from the url: 
" + url.toString() );
+}
+return IOUtil.toByteArray( is );
+}
+catch ( IOException e )
+{
+throw new SAXException( "IOException: " + e.getMessage(), e );
+}
+finally
+{
+IOUtil.close( is );
+}
+}
+
+/**
+ * Wrap {...@link IOUtil#copy(byte[], OutputStream)} to throw 
SAXException.
+ *
+ * @param res not null array of byte
+ * @param f the file where to write the bytes
+ * @throws SAXException if any
+ * @see {...@link IOUtil#copy(byte[], OutputStream)}
+ */
+private void copy( byte[] res, Fil

svn commit: r738463 - in /maven/doxia: doxia-sitetools/trunk/doxia-site-renderer/src/test/resources/site/xdoc/entityTest.xml doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/Abstract

2009-01-28 Thread vsiveton
Author: vsiveton
Date: Wed Jan 28 12:09:08 2009
New Revision: 738463

URL: http://svn.apache.org/viewvc?rev=738463&view=rev
Log:
o removed errors when validating an xml with xsd and entities like  

Modified:

maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/test/resources/site/xdoc/entityTest.xml

maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java

Modified: 
maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/test/resources/site/xdoc/entityTest.xml
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/test/resources/site/xdoc/entityTest.xml?rev=738463&r1=738462&r2=738463&view=diff
==
--- 
maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/test/resources/site/xdoc/entityTest.xml
 (original)
+++ 
maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/test/resources/site/xdoc/entityTest.xml
 Wed Jan 28 12:09:08 2009
@@ -18,8 +18,20 @@
   under the License.
 -->
 
-
-
+
+  http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent";>
+  %HTMLlat1;
+  
+  http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent";>
+  %HTMLsymbol;
+  
+  http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent";>
+  %HTMLspecial;
+]>
+http://maven.apache.org/XDOC/2.0";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 
file:../../../../../../../doxia/doxia-modules/doxia-module-xdoc/src/main/resources/xdoc-2.0.xsd">
   
 Test entities, cdatas and comments
   

Modified: 
maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java?rev=738463&r1=738462&r2=738463&view=diff
==
--- 
maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
 (original)
+++ 
maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
 Wed Jan 28 12:09:08 2009
@@ -523,19 +523,16 @@
 hasDoctype = true;
 }
 
-// 2 if no doctype, check for an xmlns instance
+// 2 check for an xmlns instance
 boolean hasXsd = false;
-if ( !hasDoctype )
+matcher = PATTERN_TAG.matcher( content );
+if ( matcher.find() )
 {
-matcher = PATTERN_TAG.matcher( content );
-if ( matcher.find() )
-{
-String value = matcher.group( 2 );
+String value = matcher.group( 2 );
 
-if ( value.indexOf( 
XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI ) != -1 )
-{
-hasXsd = true;
-}
+if ( value.indexOf( 
XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI ) != -1 )
+{
+hasXsd = true;
 }
 }
 
@@ -546,7 +543,7 @@
 {
 getLog().debug( "Validating the content..." );
 }
-getXmlReader().parse( new InputSource( new StringReader( 
content ) ) );
+getXmlReader( hasXsd && hasDoctype ).parse( new InputSource( 
new StringReader( content ) ) );
 }
 }
 catch ( IOException e )
@@ -568,10 +565,11 @@
 }
 
 /**
+ * @param hasDtdAndXsd to flag the ErrorHandler.
  * @return an xmlReader instance.
  * @throws SAXException if any
  */
-private XMLReader getXmlReader()
+private XMLReader getXmlReader( boolean hasDtdAndXsd )
 throws SAXException
 {
 if ( xmlReader == null )
@@ -585,6 +583,8 @@
 xmlReader.setEntityResolver( new CachedFileEntityResolver() );
 }
 
+( (MessagesErrorHandler) xmlReader.getErrorHandler() 
).setHasDtdAndXsd( hasDtdAndXsd );
+
 return xmlReader;
 }
 
@@ -602,13 +602,27 @@
 
 private static final int TYPE_FATAL = 3;
 
+/** @see 
org/apache/xerces/impl/msg/XMLMessages.properties#MSG_ELEMENT_NOT_DECLARED */
+private static final Pattern ELEMENT_TYPE_PATTERN =
+Pattern.compile( "Element type \".*\" must be declared.", 
Pattern.DOTALL );
+
 private final Log log;
 
+private boolean hasDtdAndXsd;
+
 public MessagesErrorHandler( Log log )
 {
 this.log = log;
 }
 
+/**
+ * @param hasDtdAndXsd the hasDtdAndXsd to set
+ */
+protected void setHasDtdAndXsd( boolean hasDtdAndXsd )
+{
+this.hasDtdAndXsd = hasDtdAndXsd;
+}
+
 /** {...@inheritdoc} */
 public void warning( SAXParseException e )
 throws SAXException
@@ -620,7 +63

svn commit: r738469 - in /maven/doxia/doxia/trunk/doxia-modules: doxia-module-fml/src/site/ doxia-module-fml/src/site/apt/ doxia-module-xdoc/src/site/ doxia-module-xdoc/src/site/apt/

2009-01-28 Thread vsiveton
Author: vsiveton
Date: Wed Jan 28 12:47:05 2009
New Revision: 738469

URL: http://svn.apache.org/viewvc?rev=738469&view=rev
Log:
o improved documentation

Added:
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/site/apt/

maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/site/apt/using-fml-xsd.apt
   (with props)
maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/site/apt/

maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/site/apt/using-xdoc-xsd.apt
   (with props)
Modified:
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/site/site.xml
maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/site/site.xml

Added: 
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/site/apt/using-fml-xsd.apt
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/site/apt/using-fml-xsd.apt?rev=738469&view=auto
==
--- 
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/site/apt/using-fml-xsd.apt
 (added)
+++ 
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/site/apt/using-fml-xsd.apt
 Wed Jan 28 12:47:05 2009
@@ -0,0 +1,43 @@
+ -
+ Using Schema FML 1.0
+ -
+ Vincent Siveton
+ --
+ 2009-01-28
+ --
+
+~~ 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/doxia/references/apt-format.html
+
+Using Schema FML 1.0
+
+  The FML XSD is located {{{http://maven.apache.org/xsd/fml-1.0.xsd}here}}.
+
+  Your favorite IDE probably supports XSD schema's for .fml files. You need to 
specify the following:
+
++-+
+
+http://maven.apache.org/FML/1.0";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/FML/1.0 
http://maven.apache.org/xsd/fml-1.0.xsd";
+  title="...">
+...
+
++-+

Propchange: 
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/site/apt/using-fml-xsd.apt
--
svn:eol-style = native

Propchange: 
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/site/apt/using-fml-xsd.apt
--
svn:keywords = Author Date Id Revision

Modified: 
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/site/site.xml
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/site/site.xml?rev=738469&r1=738468&r2=738469&view=diff
==
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/site/site.xml 
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/site/site.xml 
Wed Jan 28 12:47:05 2009
@@ -21,14 +21,20 @@
  */
  -->
 
-
+http://maven.apache.org/DECORATION/1.0.0";
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+ xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 
../../../../../doxia-sitetools/doxia-decoration-model/target/generated-site/xsd/decoration-1.0.0.xsd">
 
   
 
 
 
-
+
+  
+  
+
 
+
   
 
 
\ No newline at end of file

Added: 
maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/site/apt/using-xdoc-xsd.apt
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/site/apt/using-xdoc-xsd.apt?rev=738469&view=auto
==
--- 
maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/site/apt/using-xdoc-xsd.apt
 (added)
+++ 
maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/site/apt/using-xdoc-xsd.apt
 Wed Jan 28 12:47:05 2009
@@ -0,0 +1,42 @@
+ -
+ Using Schema XDOC 2.0
+ -
+ Vincent Siveton
+ --
+ 2009-01-28
+ --
+
+~~ 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
+~~ "Lic

svn commit: r738473 - in /maven/doxia/doxia/trunk: doxia-book/src/site/apt/using-book-xsd.apt doxia-book/src/site/site.xml doxia-core/src/site/apt/ doxia-core/src/site/apt/using-document-xsd.apt doxia

2009-01-28 Thread vsiveton
Author: vsiveton
Date: Wed Jan 28 13:06:14 2009
New Revision: 738473

URL: http://svn.apache.org/viewvc?rev=738473&view=rev
Log:
o improved documentation

Added:
maven/doxia/doxia/trunk/doxia-book/src/site/apt/using-book-xsd.apt   (with 
props)
maven/doxia/doxia/trunk/doxia-core/src/site/apt/
maven/doxia/doxia/trunk/doxia-core/src/site/apt/using-document-xsd.apt   
(with props)
Modified:
maven/doxia/doxia/trunk/doxia-book/src/site/site.xml
maven/doxia/doxia/trunk/doxia-core/src/site/site.xml

Added: maven/doxia/doxia/trunk/doxia-book/src/site/apt/using-book-xsd.apt
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-book/src/site/apt/using-book-xsd.apt?rev=738473&view=auto
==
--- maven/doxia/doxia/trunk/doxia-book/src/site/apt/using-book-xsd.apt (added)
+++ maven/doxia/doxia/trunk/doxia-book/src/site/apt/using-book-xsd.apt Wed Jan 
28 13:06:14 2009
@@ -0,0 +1,41 @@
+ -
+ Using Schema Book 1.0
+ -
+ Vincent Siveton
+ --
+ 2009-01-28
+ --
+
+~~ 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/doxia/references/apt-format.html
+
+Using Schema Book 1.0
+
+  The Decoration XSD is located 
{{{http://maven.apache.org/xsd/book-1.0.0.xsd}here}}.
+
+  Your favorite IDE probably supports XSD schema's for .xml files. You need to 
specify the following:
+
++-+
+http://maven.apache.org/BOOK/1.0.0";
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+ xsi:schemaLocation="http://maven.apache.org/BOOK/1.0.0 
http://maven.apache.org/xsd/book-1.0.0.xsd";>
+...
+
++-+

Propchange: maven/doxia/doxia/trunk/doxia-book/src/site/apt/using-book-xsd.apt
--
svn:eol-style = native

Propchange: maven/doxia/doxia/trunk/doxia-book/src/site/apt/using-book-xsd.apt
--
svn:keywords = Author Date Id Revision

Modified: maven/doxia/doxia/trunk/doxia-book/src/site/site.xml
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-book/src/site/site.xml?rev=738473&r1=738472&r2=738473&view=diff
==
--- maven/doxia/doxia/trunk/doxia-book/src/site/site.xml (original)
+++ maven/doxia/doxia/trunk/doxia-book/src/site/site.xml Wed Jan 28 13:06:14 
2009
@@ -21,7 +21,9 @@
  */
  -->
 
-
+http://maven.apache.org/DECORATION/1.0.0";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 
file:../../../../doxia-sitetools/doxia-decoration-model/target/generated-site/xsd/decoration-1.0.0.xsd">
 
   
 
@@ -30,10 +32,14 @@
 
   
   
-  
   
 
 
+
+  
+  
+
+
 
 
   

Added: maven/doxia/doxia/trunk/doxia-core/src/site/apt/using-document-xsd.apt
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/site/apt/using-document-xsd.apt?rev=738473&view=auto
==
--- maven/doxia/doxia/trunk/doxia-core/src/site/apt/using-document-xsd.apt 
(added)
+++ maven/doxia/doxia/trunk/doxia-core/src/site/apt/using-document-xsd.apt Wed 
Jan 28 13:06:14 2009
@@ -0,0 +1,42 @@
+ -
+ Using Schema Document 1.0
+ -
+ Vincent Siveton
+ --
+ 2009-01-28
+ --
+
+~~ 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 

svn commit: r738475 - in /maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/site: apt/ apt/using-decoration-xsd.apt site.xml

2009-01-28 Thread vsiveton
Author: vsiveton
Date: Wed Jan 28 13:07:08 2009
New Revision: 738475

URL: http://svn.apache.org/viewvc?rev=738475&view=rev
Log:
o improved documentation

Added:
maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/site/apt/

maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/site/apt/using-decoration-xsd.apt
   (with props)
Modified:
maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/site/site.xml

Added: 
maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/site/apt/using-decoration-xsd.apt
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/site/apt/using-decoration-xsd.apt?rev=738475&view=auto
==
--- 
maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/site/apt/using-decoration-xsd.apt
 (added)
+++ 
maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/site/apt/using-decoration-xsd.apt
 Wed Jan 28 13:07:08 2009
@@ -0,0 +1,41 @@
+ -
+ Using Schema Decoration 1.0
+ -
+ Vincent Siveton
+ --
+ 2009-01-28
+ --
+
+~~ 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/doxia/references/apt-format.html
+
+Using Schema Decoration 1.0
+
+  The Decoration XSD is located 
{{{http://maven.apache.org/xsd/decoration-1.0.0.xsd}here}}.
+
+  Your favorite IDE probably supports XSD schema's for site.xml files. You 
need to specify the following:
+
++-+
+http://maven.apache.org/DECORATION/1.0.0";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 
http://maven.apache.org/xsd/decoration-1.0.0.xsd";>
+...
+
++-+

Propchange: 
maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/site/apt/using-decoration-xsd.apt
--
svn:eol-style = native

Propchange: 
maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/site/apt/using-decoration-xsd.apt
--
svn:keywords = Author Date Id Revision

Modified: 
maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/site/site.xml
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/site/site.xml?rev=738475&r1=738474&r2=738475&view=diff
==
--- maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/site/site.xml 
(original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/site/site.xml 
Wed Jan 28 13:07:08 2009
@@ -21,12 +21,19 @@
  */
  -->
 
-
+http://maven.apache.org/DECORATION/1.0.0";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 
file:../../target/generated-site/xsd/decoration-1.0.0.xsd">
 
   
 
 
 
+
+  
+  
+
+
 
 
   




svn commit: r738491 - in /maven/doxia/site/src/site: fml/faq.fml xdoc/references/fml-format.xml xdoc/references/xdoc-format.xml

2009-01-28 Thread vsiveton
Author: vsiveton
Date: Wed Jan 28 14:10:12 2009
New Revision: 738491

URL: http://svn.apache.org/viewvc?rev=738491&view=rev
Log:
o update documentation 

Modified:
maven/doxia/site/src/site/fml/faq.fml
maven/doxia/site/src/site/xdoc/references/fml-format.xml
maven/doxia/site/src/site/xdoc/references/xdoc-format.xml

Modified: maven/doxia/site/src/site/fml/faq.fml
URL: 
http://svn.apache.org/viewvc/maven/doxia/site/src/site/fml/faq.fml?rev=738491&r1=738490&r2=738491&view=diff
==
--- maven/doxia/site/src/site/fml/faq.fml (original)
+++ maven/doxia/site/src/site/fml/faq.fml Wed Jan 28 14:10:12 2009
@@ -1,4 +1,4 @@
-
+
 
 
 
-
+http://maven.apache.org/FML/1.0";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/FML/1.0 
file:../../../../doxia/doxia-modules/doxia-module-fml/src/main/resources/fml-1.0.xsd"
+  title="Frequently Asked Questions">
   
 
   How to handle style in the APT markup language?
@@ -75,12 +78,25 @@
 
 
 
-  Where are the Maven Doxia XSD schemas for Xdoc and FML 
files?
+  Where are the Maven Doxia XSD schemas files?
   
 
-  The Xdoc XSD is located http://maven.apache.org/xsd/xdoc-2.0.xsd";>here and
-  the FML XSD is located http://maven.apache.org/xsd/fml-1.0.xsd";>here.
+  The Doxia XSD files are located here:
 
+
+
+  Xdoc XSD 2.0
+  http://maven.apache.org/xsd/xdoc-2.0.xsd";>http://maven.apache.org/xsd/xdoc-2.0.xsd
+  FML XSD 1.0
+  http://maven.apache.org/xsd/fml-1.0.xsd";>http://maven.apache.org/xsd/fml-1.0.xsd
+  Book XSD 1.0
+  http://maven.apache.org/xsd/book-1.0.0.xsd";>http://maven.apache.org/xsd/book-1.0.0.xsd
+  Document XSD 1.0
+  http://maven.apache.org/xsd/document-1.0.0.xsd";>http://maven.apache.org/xsd/document-1.0.0.xsd
+  Decoration XSD 1.0
+  http://maven.apache.org/xsd/decoration-1.0.0.xsd";>http://maven.apache.org/xsd/decoration-1.0.0.xsd
+
+
 
   Your favorite IDE probably supports XSD schema's for Xdoc and FML 
files. You need to
   specify the following:
@@ -96,6 +112,25 @@
   xsi:schemaLocation="http://maven.apache.org/FML/1.0 
http://maven.apache.org/xsd/fml-1.0.xsd">;
   ...
 
+  
+
+  ...
+
+  
+
+  ...
+
+  
+;
+  ...
+
 
   
 

Modified: maven/doxia/site/src/site/xdoc/references/fml-format.xml
URL: 
http://svn.apache.org/viewvc/maven/doxia/site/src/site/xdoc/references/fml-format.xml?rev=738491&r1=738490&r2=738491&view=diff
==
--- maven/doxia/site/src/site/xdoc/references/fml-format.xml (original)
+++ maven/doxia/site/src/site/xdoc/references/fml-format.xml Wed Jan 28 
14:10:12 2009
@@ -1,4 +1,5 @@
-
+
+
 
-
+-->
+
+http://maven.apache.org/XDOC/2.0";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 
file:../../../../../doxia/doxia-modules/doxia-module-xdoc/src/main/resources/xdoc-2.0.xsd">
 
   
 The FML (FAQ Markup Language) format
@@ -25,27 +29,31 @@
   
 
   
-
 
-
   
-
 
-  An 'fml' is an XML document conforming to a small and simple set of 
tags.
+  An 'fml' (FAQ Markup Language) is an XML document conforming to a 
small and simple set of tags.
   The format was first used in the http://maven.apache.org/maven-1.x/";>Maven 1,
   version of the http://maven.apache.org/maven-1.x/plugins/faq/";>FAQ plugin.
 
-
   
 
   
+
+  The full documentation is available at here.
+
+  
 
+  
 
   The following is a sample FML document:
 
 
 
   
+
 
+
+  
+Doxia is able to validate your fml files as described
+here.
+  
 
 
   
-
 

Modified: maven/doxia/site/src/site/xdoc/references/xdoc-format.xml
URL: 
http://svn.apache.org/viewvc/maven/doxia/site/src/site/xdoc/references/xdoc-format.xml?rev=738491&r1=738490&r2=738491&view=diff
===

svn commit: r738493 - in /maven/doxia/site/src: books/example-book.xml site/site.xml site/xdoc/references/index.xml

2009-01-28 Thread vsiveton
Author: vsiveton
Date: Wed Jan 28 14:11:06 2009
New Revision: 738493

URL: http://svn.apache.org/viewvc?rev=738493&view=rev
Log:
o added XSD

Modified:
maven/doxia/site/src/books/example-book.xml
maven/doxia/site/src/site/site.xml
maven/doxia/site/src/site/xdoc/references/index.xml

Modified: maven/doxia/site/src/books/example-book.xml
URL: 
http://svn.apache.org/viewvc/maven/doxia/site/src/books/example-book.xml?rev=738493&r1=738492&r2=738493&view=diff
==
--- maven/doxia/site/src/books/example-book.xml (original)
+++ maven/doxia/site/src/books/example-book.xml Wed Jan 28 14:11:06 2009
@@ -1,5 +1,30 @@
+
+
+
+
 
-
+http://maven.apache.org/BOOK/1.0.0";
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+ xsi:schemaLocation="http://maven.apache.org/BOOK/1.0.0 
../../../doxia/doxia-book/target/generated-site/xsd/book-1.0.0.xsd">
   doxia-example-book
   XFire User Manual
   

Modified: maven/doxia/site/src/site/site.xml
URL: 
http://svn.apache.org/viewvc/maven/doxia/site/src/site/site.xml?rev=738493&r1=738492&r2=738493&view=diff
==
--- maven/doxia/site/src/site/site.xml (original)
+++ maven/doxia/site/src/site/site.xml Wed Jan 28 14:11:06 2009
@@ -21,7 +21,10 @@
  */
  -->
 
-
+http://maven.apache.org/DECORATION/1.0.0";
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+ xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 
../../../doxia-sitetools/doxia-decoration-model/target/generated-site/xsd/decoration-1.0.0.xsd"
+ name="Doxia">
   
   
   

Modified: maven/doxia/site/src/site/xdoc/references/index.xml
URL: 
http://svn.apache.org/viewvc/maven/doxia/site/src/site/xdoc/references/index.xml?rev=738493&r1=738492&r2=738493&view=diff
==
--- maven/doxia/site/src/site/xdoc/references/index.xml (original)
+++ maven/doxia/site/src/site/xdoc/references/index.xml Wed Jan 28 14:11:06 2009
@@ -1,4 +1,4 @@
-
+
 
 
+-->
 
-
+http://maven.apache.org/XDOC/2.0";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 
file:../../../../../doxia/doxia-modules/doxia-module-xdoc/src/main/resources/xdoc-2.0.xsd">
 
   
 Doxia Markup Languages References




svn commit: r738494 - in /maven/doxia/site: pom.xml src/site/apt/book/index.apt

2009-01-28 Thread vsiveton
Author: vsiveton
Date: Wed Jan 28 14:15:44 2009
New Revision: 738494

URL: http://svn.apache.org/viewvc?rev=738494&view=rev
Log:
o remove the book xsd generation

Modified:
maven/doxia/site/pom.xml
maven/doxia/site/src/site/apt/book/index.apt

Modified: maven/doxia/site/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/doxia/site/pom.xml?rev=738494&r1=738493&r2=738494&view=diff
==
--- maven/doxia/site/pom.xml (original)
+++ maven/doxia/site/pom.xml Wed Jan 28 14:15:44 2009
@@ -180,33 +180,6 @@
 
   
 
-  
-org.codehaus.modello
-modello-maven-plugin
-1.0-alpha-21
-
-  
-src/main/modello/book.mdo
-  
-  1.0.0
-
-
-  
-site-docs
-pre-site
-
-  xdoc
-  xsd
-
-
-  
-../doxia/doxia-book/src/main/modello/book.mdo
-  
-  1.0.0
-
-  
-
-  
 
   
 

Modified: maven/doxia/site/src/site/apt/book/index.apt
URL: 
http://svn.apache.org/viewvc/maven/doxia/site/src/site/apt/book/index.apt?rev=738494&r1=738493&r2=738494&view=diff
==
--- maven/doxia/site/src/site/apt/book/index.apt (original)
+++ maven/doxia/site/src/site/apt/book/index.apt Wed Jan 28 14:15:44 2009
@@ -2,7 +2,10 @@
  Writing Books in Doxia
  -
  Trygve Laugstol
- -
+ Vincent Siveton
+ --
+ 2009-01-28
+ --
 
 Introduction
 
@@ -17,7 +20,7 @@
  The only thing you need in addition to the content files itself is a simple 
book descriptor which is used to specify
  the ordering of the sections and the names for the chapters.
 
- See {{{../book.html}The Book Descriptor Reference}} for a reference to the 
descriptor.
+ See {{{doxia/doxia-book/book.html}The Book Descriptor Reference}} for a 
reference to the descriptor.
 
 * Creating Book Descriptor
 




svn commit: r738495 - in /maven/doxia/site/src/site/apt: book/index.apt references/apt-format.apt references/doxia-apt.apt

2009-01-28 Thread vsiveton
Author: vsiveton
Date: Wed Jan 28 14:18:09 2009
New Revision: 738495

URL: http://svn.apache.org/viewvc?rev=738495&view=rev
Log:
o added license header

Modified:
maven/doxia/site/src/site/apt/book/index.apt
maven/doxia/site/src/site/apt/references/apt-format.apt
maven/doxia/site/src/site/apt/references/doxia-apt.apt

Modified: maven/doxia/site/src/site/apt/book/index.apt
URL: 
http://svn.apache.org/viewvc/maven/doxia/site/src/site/apt/book/index.apt?rev=738495&r1=738494&r2=738495&view=diff
==
--- maven/doxia/site/src/site/apt/book/index.apt (original)
+++ maven/doxia/site/src/site/apt/book/index.apt Wed Jan 28 14:18:09 2009
@@ -7,6 +7,26 @@
  2009-01-28
  --
 
+~~ 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/doxia/references/apt-format.html
+
 Introduction
 
  Doxia allows you to write books like user manuals and guides in any format 
supported by Doxia. Combined with the

Modified: maven/doxia/site/src/site/apt/references/apt-format.apt
URL: 
http://svn.apache.org/viewvc/maven/doxia/site/src/site/apt/references/apt-format.apt?rev=738495&r1=738494&r2=738495&view=diff
==
--- maven/doxia/site/src/site/apt/references/apt-format.apt (original)
+++ maven/doxia/site/src/site/apt/references/apt-format.apt Wed Jan 28 14:18:09 
2009
@@ -3,6 +3,28 @@
  -
  Jason van Zyl
  -
+ 2009-01-28
+ --
+
+~~ 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/doxia/references/apt-format.html
 
 The APT format
 ~~

Modified: maven/doxia/site/src/site/apt/references/doxia-apt.apt
URL: 
http://svn.apache.org/viewvc/maven/doxia/site/src/site/apt/references/doxia-apt.apt?rev=738495&r1=738494&r2=738495&view=diff
==
--- maven/doxia/site/src/site/apt/references/doxia-apt.apt (original)
+++ maven/doxia/site/src/site/apt/references/doxia-apt.apt Wed Jan 28 14:18:09 
2009
@@ -3,6 +3,28 @@
  -
  Lukas Theussl
  -
+ 2009-01-28
+ --
+
+~~ 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/doxia/references/apt-format.html
 
 Enhancements to the APT format
 ~~
@@ -11,7 +33,7 @@
   original {{{./apt-format.html}APT}} format that were incorporated in Doxia.
   Note that the original specification still applies to <>
   (used e.g. by Maven-2.0.x), t

svn commit: r738497 - in /maven/doxia: doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/ doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/m

2009-01-28 Thread vsiveton
Author: vsiveton
Date: Wed Jan 28 14:30:50 2009
New Revision: 738497

URL: http://svn.apache.org/viewvc?rev=738497&view=rev
Log:
o moved org.apache.maven.doxia.module.xhtml.decoration.render.RenderingContext 
from xhtml module to org.apache.maven.doxia.sink.render.RenderingContext in core
o updated ref

Added:

maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/render/
  - copied from r738065, 
maven/doxia/doxia/trunk/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/decoration/render/

maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/sink/render/
  - copied from r738065, 
maven/doxia/doxia/trunk/doxia-modules/doxia-module-xhtml/src/test/java/org/apache/maven/doxia/module/xhtml/decoration/render/
Removed:

maven/doxia/doxia/trunk/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/decoration/

maven/doxia/doxia/trunk/doxia-modules/doxia-module-xhtml/src/test/java/org/apache/maven/doxia/module/xhtml/decoration/
Modified:

maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java

maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DocumentRenderer.java

maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DoxiaDocumentRenderer.java

maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/Renderer.java

maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/sink/SiteRendererSink.java

maven/doxia/doxia/trunk/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/XHtmlBookRenderer.java

maven/doxia/doxia/trunk/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/xhtml/XhtmlBookSink.java

maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/render/RenderingContext.java

maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/sink/render/RenderingContextTest.java

Modified: 
maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java?rev=738497&r1=738496&r2=738497&view=diff
==
--- 
maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java
 (original)
+++ 
maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java
 Wed Jan 28 14:30:50 2009
@@ -53,7 +53,7 @@
 
 import org.apache.maven.doxia.Doxia;
 import org.apache.maven.doxia.logging.PlexusLoggerWrapper;
-import org.apache.maven.doxia.module.xhtml.decoration.render.RenderingContext;
+import org.apache.maven.doxia.sink.render.RenderingContext;
 import org.apache.maven.doxia.parser.ParseException;
 import org.apache.maven.doxia.parser.Parser;
 import org.apache.maven.doxia.parser.manager.ParserNotFoundException;

Modified: 
maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DocumentRenderer.java
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DocumentRenderer.java?rev=738497&r1=738496&r2=738497&view=diff
==
--- 
maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DocumentRenderer.java
 (original)
+++ 
maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DocumentRenderer.java
 Wed Jan 28 14:30:50 2009
@@ -23,7 +23,7 @@
 import java.io.UnsupportedEncodingException;
 import java.io.Writer;
 
-import org.apache.maven.doxia.module.xhtml.decoration.render.RenderingContext;
+import org.apache.maven.doxia.sink.render.RenderingContext;
 
 /**
  * Renders a page.

Modified: 
maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DoxiaDocumentRenderer.java
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DoxiaDocumentRenderer.java?rev=738497&r1=738496&r2=738497&view=diff
==
--- 
maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DoxiaDocumentRenderer.java
 (original)
+++ 
maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/ap