You are viewing a plain text version of this content. The canonical link for it is here.
Posted to doxia-commits@maven.apache.org by vs...@apache.org on 2009/06/15 12:28:19 UTC
svn commit: r784718 - in
/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml: ./
src/main/components/ src/main/java/org/apache/maven/doxia/module/fml/
src/main/resources/ src/test/java/org/apache/maven/doxia/module/fml/
src/test/resources/
Author: vsiveton
Date: Mon Jun 15 10:28:18 2009
New Revision: 784718
URL: http://svn.apache.org/viewvc?rev=784718&view=rev
Log:
DOXIA-281: Add macro support in FML
o import part of code from XdocParser to handle macro tag
o updated the xsd
o added/updated test cases
Added:
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/components/
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/components/components.xml (with props)
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/resources/fml-1.0.1.xsd
- copied, changed from r784532, maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/resources/fml-1.0.xsd
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/resources/macro.fml (with props)
Removed:
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/resources/fml-1.0.xsd
Modified:
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/pom.xml
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlMarkup.java
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlParser.java
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlParserTest.java
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlValidatorTest.java
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/resources/simpleFaq.fml
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/resources/test.fml
Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/pom.xml
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/pom.xml?rev=784718&r1=784717&r2=784718&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/pom.xml (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/pom.xml Mon Jun 15 10:28:18 2009
@@ -75,6 +75,23 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-maven-plugin</artifactId>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/components/components.xml</descriptor>
+ <descriptor>target/generated-resources/plexus/META-INF/plexus/components.xml</descriptor>
+ </descriptors>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>merge-descriptors</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
Added: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/components/components.xml
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/components/components.xml?rev=784718&view=auto
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/components/components.xml (added)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/components/components.xml Mon Jun 15 10:28:18 2009
@@ -0,0 +1,36 @@
+<?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.
+-->
+<component-set>
+ <components>
+ <component>
+ <role>org.apache.maven.doxia.parser.Parser</role>
+ <role-hint>fml</role-hint>
+ <implementation>org.apache.maven.doxia.module.fml.FmlParser</implementation>
+ <description>Parse an xdoc model and emit events into the specified doxia Sink.</description>
+ <requirements>
+ <requirement>
+ <role>org.apache.maven.doxia.macro.manager.MacroManager</role>
+ <field-name>macroManager</field-name>
+ </requirement>
+ </requirements>
+ </component>
+ </components>
+</component-set>
Propchange: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/components/components.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/components/components.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlMarkup.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlMarkup.java?rev=784718&r1=784717&r2=784718&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlMarkup.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlMarkup.java Mon Jun 15 10:28:18 2009
@@ -36,11 +36,11 @@
public interface FmlMarkup
extends HtmlMarkup
{
- /** FML namespace: "http://maven.apache.org/FML/1.0" */
- String FML_NAMESPACE = "http://maven.apache.org/FML/1.0";
+ /** FML namespace: "http://maven.apache.org/FML/1.0.1" */
+ String FML_NAMESPACE = "http://maven.apache.org/FML/1.0.1";
- /** FML system id: "http://maven.apache.org/xsd/fml-1.0.xsd" */
- String FML_SYSTEM_ID = "http://maven.apache.org/xsd/fml-1.0.xsd";
+ /** FML system id: "http://maven.apache.org/xsd/fml-1.0.1.xsd" */
+ String FML_SYSTEM_ID = "http://maven.apache.org/xsd/fml-1.0.1.xsd";
// ----------------------------------------------------------------------
// Specific Fml tags
@@ -105,4 +105,17 @@
return "source";
}
};
+
+ /**
+ * Fml tag for <code>macro</code>
+ * @since 1.1.1
+ */
+ Tag MACRO_TAG = new Tag()
+ {
+ /** {@inheritDoc} */
+ public String toString()
+ {
+ return "macro";
+ }
+ };
}
Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlParser.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlParser.java?rev=784718&r1=784717&r2=784718&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlParser.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlParser.java Mon Jun 15 10:28:18 2009
@@ -19,7 +19,10 @@
* under the License.
*/
+import java.io.IOException;
import java.io.Reader;
+import java.io.StringReader;
+import java.io.StringWriter;
import java.util.HashMap;
import java.util.Iterator;
@@ -30,6 +33,8 @@
import javax.swing.text.html.HTML.Attribute;
import org.apache.maven.doxia.macro.MacroExecutionException;
+import org.apache.maven.doxia.macro.MacroRequest;
+import org.apache.maven.doxia.macro.manager.MacroNotFoundException;
import org.apache.maven.doxia.module.fml.model.Faq;
import org.apache.maven.doxia.module.fml.model.Faqs;
import org.apache.maven.doxia.module.fml.model.Part;
@@ -37,9 +42,11 @@
import org.apache.maven.doxia.parser.ParseException;
import org.apache.maven.doxia.sink.Sink;
import org.apache.maven.doxia.sink.SinkEventAttributeSet;
+import org.apache.maven.doxia.sink.XhtmlBaseSink;
import org.apache.maven.doxia.util.DoxiaUtils;
import org.apache.maven.doxia.util.HtmlTools;
+import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.xml.pull.XmlPullParser;
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
@@ -73,14 +80,40 @@
* Using to reduce warn messages. */
private Map warnMessages;
+ /** The source content of the input reader. Used to pass into macros. */
+ private String sourceContent;
+
+ /** A macro name. */
+ private String macroName;
+
+ /** The macro parameters. */
+ private Map macroParameters = new HashMap();
+
/** {@inheritDoc} */
public void parse( Reader source, Sink sink )
throws ParseException
{
+ try
+ {
+ StringWriter contentWriter = new StringWriter();
+ IOUtil.copy( source, contentWriter );
+ sourceContent = contentWriter.toString();
+ }
+ catch ( IOException ex )
+ {
+ throw new ParseException( "Error reading the input source: " + ex.getMessage(), ex );
+ }
+ finally
+ {
+ IOUtil.close( source );
+ }
+
+ Reader tmp = new StringReader( sourceContent );
+
this.faqs = new Faqs();
// this populates faqs
- super.parse( source, sink );
+ super.parse( tmp, sink );
writeFaqs( sink );
@@ -178,6 +211,19 @@
.append( String.valueOf( GREATER_THAN ) );
}
+
+ // ----------------------------------------------------------------------
+ // Macro
+ // ----------------------------------------------------------------------
+
+ else if ( parser.getName().equals( MACRO_TAG.toString() ) )
+ {
+ handleMacroStart( parser );
+ }
+ else if ( parser.getName().equals( PARAM.toString() ) )
+ {
+ handleParamStart( parser, sink );
+ }
else if ( buffer != null )
{
buffer.append( String.valueOf( LESS_THAN ) ).append( parser.getName() );
@@ -272,6 +318,22 @@
buffer = null;
}
+
+ // ----------------------------------------------------------------------
+ // Macro
+ // ----------------------------------------------------------------------
+
+ else if ( parser.getName().equals( MACRO_TAG.toString() ) )
+ {
+ handleMacroEnd( buffer );
+ }
+ else if ( parser.getName().equals( PARAM.toString() ) )
+ {
+ if ( !StringUtils.isNotEmpty( macroName ) )
+ {
+ handleUnknown( parser, sink, TAG_TYPE_END );
+ }
+ }
else if ( buffer != null )
{
if ( buffer.length() > 0 && buffer.charAt( buffer.length() - 1 ) == SPACE )
@@ -357,6 +419,107 @@
}
/**
+ * TODO import from XdocParser, probably need to be generic.
+ *
+ * @param parser not null
+ * @throws MacroExecutionException if any
+ */
+ private void handleMacroStart( XmlPullParser parser )
+ throws MacroExecutionException
+ {
+ if ( !isSecondParsing() )
+ {
+ macroName = parser.getAttributeValue( null, Attribute.NAME.toString() );
+
+ if ( macroParameters == null )
+ {
+ macroParameters = new HashMap();
+ }
+
+ if ( StringUtils.isEmpty( macroName ) )
+ {
+ throw new MacroExecutionException( "The '" + Attribute.NAME.toString()
+ + "' attribute for the '" + MACRO_TAG.toString() + "' tag is required." );
+ }
+ }
+ }
+
+ /**
+ * TODO import from XdocParser, probably need to be generic.
+ *
+ * @param buffer not null
+ * @throws MacroExecutionException if any
+ */
+ private void handleMacroEnd( StringBuffer buffer )
+ throws MacroExecutionException
+ {
+ if ( !isSecondParsing() )
+ {
+ if ( StringUtils.isNotEmpty( macroName ) )
+ {
+ // TODO handles specific macro attributes
+ macroParameters.put( "sourceContent", sourceContent );
+ FmlParser fmlParser = new FmlParser();
+ fmlParser.setSecondParsing( true );
+ macroParameters.put( "parser", fmlParser );
+
+ MacroRequest request = new MacroRequest( macroParameters, getBasedir() );
+
+ try
+ {
+ StringWriter sw = new StringWriter();
+ XhtmlBaseSink sink = new XhtmlBaseSink(sw);
+ executeMacro( macroName, request, sink );
+ sink.close();
+ buffer.append( sw.toString() );
+ } catch ( MacroNotFoundException me )
+ {
+ throw new MacroExecutionException( "Macro not found: " + macroName, me );
+ }
+ }
+ }
+
+ // Reinit macro
+ macroName = null;
+ macroParameters = null;
+ }
+
+ /**
+ * TODO import from XdocParser, probably need to be generic.
+ *
+ * @param parser not null
+ * @param sink not null
+ * @throws MacroExecutionException if any
+ */
+ private void handleParamStart( XmlPullParser parser, Sink sink )
+ throws MacroExecutionException
+ {
+ if ( !isSecondParsing() )
+ {
+ if ( StringUtils.isNotEmpty( macroName ) )
+ {
+ String paramName = parser.getAttributeValue( null, Attribute.NAME.toString() );
+ String paramValue = parser.getAttributeValue( null,
+ Attribute.VALUE.toString() );
+
+ if ( StringUtils.isEmpty( paramName ) || StringUtils.isEmpty( paramValue ) )
+ {
+ throw new MacroExecutionException( "'" + Attribute.NAME.toString()
+ + "' and '" + Attribute.VALUE.toString() + "' attributes for the '" + PARAM.toString()
+ + "' tag are required inside the '" + MACRO_TAG.toString() + "' tag." );
+ }
+
+ macroParameters.put( paramName, paramValue );
+ }
+ else
+ {
+ // param tag from non-macro object, see MSITE-288
+ handleUnknown( parser, sink, TAG_TYPE_START );
+ }
+ }
+ }
+
+ /**
* Writes the faqs to the specified sink.
*
* @param faqs The faqs to emit.
Copied: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/resources/fml-1.0.1.xsd (from r784532, maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/resources/fml-1.0.xsd)
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/resources/fml-1.0.1.xsd?p2=maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/resources/fml-1.0.1.xsd&p1=maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/resources/fml-1.0.xsd&r1=784532&r2=784718&rev=784718&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/resources/fml-1.0.xsd (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/resources/fml-1.0.1.xsd Mon Jun 15 10:28:18 2009
@@ -22,14 +22,14 @@
<xs:schema version="1.0"
xml:lang="en"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://maven.apache.org/FML/1.0"
- xmlns="http://maven.apache.org/FML/1.0"
+ targetNamespace="http://maven.apache.org/FML/1.0.1"
+ xmlns="http://maven.apache.org/FML/1.0.1"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
elementFormDefault="qualified">
<xs:annotation>
<xs:documentation source="description">
- Doxia FML (FAQ Markup Language) 1.0 XML Schema.
+ Doxia FML (FAQ Markup Language) 1.0.1 XML Schema.
This is based on: Extensible HTML version 1.0 Transitional XML Schema
http://www.w3.org/2002/08/xhtml/xhtml1-transitional.xsd
@@ -449,6 +449,7 @@
<xs:element ref="map"/>
<xs:element ref="iframe"/>
<xs:element ref="source"/> <!-- FML specific -->
+ <xs:element ref="macro"/> <!-- FML specific -->
</xs:choice>
</xs:group>
@@ -2909,4 +2910,19 @@
</xs:sequence>
</xs:complexType>
</xs:element>
+
+ <xs:element name="macro">
+ <xs:annotation>
+ <xs:documentation source="version">1.0.1</xs:documentation>
+ <xs:documentation source="description">
+ A macro element.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="param"/>
+ </xs:choice>
+ <xs:attribute name="name" use="required" type="Text"/>
+ </xs:complexType>
+ </xs:element>
</xs:schema>
\ No newline at end of file
Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlParserTest.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlParserTest.java?rev=784718&r1=784717&r2=784718&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlParserTest.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlParserTest.java Mon Jun 15 10:28:18 2009
@@ -20,15 +20,19 @@
*/
import java.io.File;
+import java.io.FileReader;
import java.io.Reader;
+import java.io.Writer;
import java.util.Iterator;
import java.util.List;
import org.apache.maven.doxia.parser.AbstractParserTest;
import org.apache.maven.doxia.parser.Parser;
+import org.apache.maven.doxia.sink.Sink;
import org.apache.maven.doxia.sink.SinkEventElement;
import org.apache.maven.doxia.sink.SinkEventTestingSink;
+import org.apache.maven.doxia.sink.XhtmlBaseSink;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.IOUtil;
@@ -39,12 +43,16 @@
public class FmlParserTest
extends AbstractParserTest
{
+ private FmlParser parser;
+
/** {@inheritDoc} */
protected void setUp()
throws Exception
{
super.setUp();
+ parser = (FmlParser) lookup( Parser.ROLE, "fml" );
+
// AbstractXmlParser.CachedFileEntityResolver downloads DTD/XSD files in ${java.io.tmpdir}
// Be sure to delete them
String tmpDir = System.getProperty( "java.io.tmpdir" );
@@ -60,7 +68,7 @@
/** {@inheritDoc} */
protected Parser createParser()
{
- return new FmlParser();
+ return parser;
}
/** {@inheritDoc} */
@@ -69,15 +77,13 @@
return "fml";
}
- /** @throws Exception */
+ /** @throws Exception */
public void testFaqEventsList()
throws Exception
{
-
SinkEventTestingSink sink = new SinkEventTestingSink();
Reader reader = null;
-
try
{
reader = getTestReader( "simpleFaq" );
@@ -143,7 +149,7 @@
assertFalse( it.hasNext() );
}
- /** @throws Exception */
+ /** @throws Exception */
public void testEntities()
throws Exception
{
@@ -244,6 +250,47 @@
assertFalse( it.hasNext() );
}
+ /**
+ * @throws Exception if any
+ * @since 1.1.1
+ */
+ public void testFaqMacro()
+ throws Exception
+ {
+ Writer output = null;
+ Reader reader = null;
+ try
+ {
+ output = getTestWriter( "macro" );
+ reader = getTestReader( "macro" );
+
+ Sink sink = new XhtmlBaseSink( output );
+ createParser().parse( reader, sink );
+ sink.close();
+ }
+ finally
+ {
+ IOUtil.close( output );
+ IOUtil.close( reader );
+ }
+
+ File f = getTestFile( getBasedir(), outputBaseDir() + getOutputDir() + "macro.fml" );
+ assertTrue( "The file " + f.getAbsolutePath() + " was not created", f.exists() );
+
+ String content;
+ try
+ {
+ reader = new FileReader( f );
+ content = IOUtil.toString( reader );
+ }
+ finally
+ {
+ IOUtil.close( reader );
+ }
+
+ assertTrue( content.indexOf( "<a name=\"macro-definition\">Macro Question</a>" ) != -1 );
+ }
+
private void assertTextEvent( SinkEventElement textEvt, String string )
{
assertEquals( "text", textEvt.getName() );
Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlValidatorTest.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlValidatorTest.java?rev=784718&r1=784717&r2=784718&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlValidatorTest.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlValidatorTest.java Mon Jun 15 10:28:18 2009
@@ -38,7 +38,7 @@
extends AbstractXmlValidatorTest
{
/** The xsd to use */
- private static final File FML_XSD = new File( getBasedir(), "/src/main/resources/fml-1.0.xsd" );
+ private static final File FML_XSD = new File( getBasedir(), "/src/main/resources/fml-1.0.1.xsd" );
/** {@inheritDoc} */
protected void setUp()
Added: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/resources/macro.fml
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/resources/macro.fml?rev=784718&view=auto
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/resources/macro.fml (added)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/resources/macro.fml Mon Jun 15 10:28:18 2009
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+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.
+-->
+
+<faqs xmlns="http://maven.apache.org/FML/1.0.1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/FML/1.0.1 file:../../main/resources/fml-1.0.1.xsd"
+ title="Frequently Asked Questions">
+
+ <part id="general">
+ <title>Test the macro support</title>
+
+ <faq id="test-macro">
+ <question>Question</question>
+ <answer>
+ <p>Answer with macro</p>
+ <macro name="snippet">
+ <param name="id" value="superpom"/>
+ <param name="file" value="src/test/resources/macro.fml"/>
+ </macro>
+ </answer>
+ </faq>
+
+<!-- START SNIPPET: fmlmacro -->
+ <faq id="macro-definition">
+ <question>Macro Question</question>
+ <answer>
+ <p>Macro Answer</p>
+ </answer>
+ </faq>
+<!-- END SNIPPET: fmlmacro -->
+ </part>
+</faqs>
Propchange: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/resources/macro.fml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/resources/simpleFaq.fml
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/resources/simpleFaq.fml?rev=784718&r1=784717&r2=784718&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/resources/simpleFaq.fml (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/resources/simpleFaq.fml Mon Jun 15 10:28:18 2009
@@ -18,9 +18,9 @@
under the License.
-->
-<faqs xmlns="http://maven.apache.org/FML/1.0"
+<faqs xmlns="http://maven.apache.org/FML/1.0.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/FML/1.0 file:../../main/resources/fml-1.0.xsd"
+ xsi:schemaLocation="http://maven.apache.org/FML/1.0.1 file:../../main/resources/fml-1.0.1.xsd"
title="Frequently Asked Questions">
<part id="general">
Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/resources/test.fml
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/resources/test.fml?rev=784718&r1=784717&r2=784718&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/resources/test.fml (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/resources/test.fml Mon Jun 15 10:28:18 2009
@@ -19,9 +19,9 @@
-->
<!-- TODO [later]: faqs need some sorting -->
-<faqs xmlns="http://maven.apache.org/FML/1.0"
+<faqs xmlns="http://maven.apache.org/FML/1.0.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/FML/1.0 file:../../main/resources/fml-1.0.xsd"
+ xsi:schemaLocation="http://maven.apache.org/FML/1.0.1 file:../../main/resources/fml-1.0.1.xsd"
title="Frequently Asked Questions">
<part id="general">