You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Sergey Shikov (JIRA)" <ji...@codehaus.org> on 2010/08/13 09:36:32 UTC

[jira] Created: (DOXIA-403) FO module creating non-wellformed xls-fo output

FO module creating non-wellformed xls-fo output 
------------------------------------------------

                 Key: DOXIA-403
                 URL: http://jira.codehaus.org/browse/DOXIA-403
             Project: Maven Doxia
          Issue Type: Bug
          Components: Module - FO
    Affects Versions: 1.1.3
            Reporter: Sergey Shikov


This code, copy&pasted from Doxia site, producing non-wellformed FO document:

Java:
try {
	// Open input apt document:
	StringReader source= new StringReader("h1. test");

	// Create FO sink:
	Writer writer = new StringWriter();
	FoSink fosink= new FoSink(writer);

	Parser parser= new ConfluenceParser();
	parser.parse(source, fosink);

	// close streams
	fosink.close();
	source.close();

	System.out.println(writer.toString());
} catch (ParseException e) {
	e.printStackTrace();
} catch (IOException e) {
	e.printStackTrace();
}

Result:

<fo:page-sequence initial-page-number="0" master-reference="body">
<fo:flow flow-name="xsl-region-body">



<fo:block white-space-collapse="true" line-height="12pt" font-family="Garamond,serif" font-size="11pt">

<fo:block space-after="6pt" font-weight="bold" space-before="18pt" font-family="Helvetica,sans-serif" keep-with-next="always" color="#000000" font-size="12pt">1   test</fo:block>
</fo:block>

</fo:flow>
</fo:page-sequence>
</fo:root>

No open tag fo:root in document.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DOXIA-403) FO module creating non-wellformed xls-fo output

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/DOXIA-403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=231886#action_231886 ] 

Lukas Theussl commented on DOXIA-403:
-------------------------------------

I think the missing sink calls should be inserted by the confluence parser, you shouldn't have to call begin/endDocument explicitly (provided the String "h1. test" alone is a valid confluence document).

> FO module creating non-wellformed xls-fo output 
> ------------------------------------------------
>
>                 Key: DOXIA-403
>                 URL: http://jira.codehaus.org/browse/DOXIA-403
>             Project: Maven Doxia
>          Issue Type: Bug
>          Components: Module - FO
>    Affects Versions: 1.1.3
>            Reporter: Sergey Shikov
>
> This code, copy&pasted from Doxia site, producing non-wellformed FO document:
> Java:
> {code}
> try {
> 	// Open input apt document:
> 	StringReader source= new StringReader("h1. test");
> 	// Create FO sink:
> 	Writer writer = new StringWriter();
> 	FoSink fosink= new FoSink(writer);
> 	Parser parser= new ConfluenceParser();
> 	parser.parse(source, fosink);
> 	// close streams
> 	fosink.close();
> 	source.close();
> 	System.out.println(writer.toString());
> } catch (ParseException e) {
> 	e.printStackTrace();
> } catch (IOException e) {
> 	e.printStackTrace();
> }
> {code}
> Result:
> {code:xml}
> <fo:page-sequence initial-page-number="0" master-reference="body">
> <fo:flow flow-name="xsl-region-body">
> <fo:block white-space-collapse="true" line-height="12pt" font-family="Garamond,serif" font-size="11pt">
> <fo:block space-after="6pt" font-weight="bold" space-before="18pt" font-family="Helvetica,sans-serif" keep-with-next="always" color="#000000" font-size="12pt">1   test</fo:block>
> </fo:block>
> </fo:flow>
> </fo:page-sequence>
> </fo:root>
> {code}
> No open tag fo:root in document.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DOXIA-403) FO module creating non-wellformed xls-fo output

Posted by "Sergey Shikov (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/DOXIA-403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=231884#action_231884 ] 

Sergey Shikov commented on DOXIA-403:
-------------------------------------

>From this page:
http://maven.apache.org/doxia/doxia/doxia-modules/doxia-module-fo/usage.html

> FO module creating non-wellformed xls-fo output 
> ------------------------------------------------
>
>                 Key: DOXIA-403
>                 URL: http://jira.codehaus.org/browse/DOXIA-403
>             Project: Maven Doxia
>          Issue Type: Bug
>          Components: Module - FO
>    Affects Versions: 1.1.3
>            Reporter: Sergey Shikov
>
> This code, copy&pasted from Doxia site, producing non-wellformed FO document:
> Java:
> {code}
> try {
> 	// Open input apt document:
> 	StringReader source= new StringReader("h1. test");
> 	// Create FO sink:
> 	Writer writer = new StringWriter();
> 	FoSink fosink= new FoSink(writer);
> 	Parser parser= new ConfluenceParser();
> 	parser.parse(source, fosink);
> 	// close streams
> 	fosink.close();
> 	source.close();
> 	System.out.println(writer.toString());
> } catch (ParseException e) {
> 	e.printStackTrace();
> } catch (IOException e) {
> 	e.printStackTrace();
> }
> {code}
> Result:
> {code:xml}
> <fo:page-sequence initial-page-number="0" master-reference="body">
> <fo:flow flow-name="xsl-region-body">
> <fo:block white-space-collapse="true" line-height="12pt" font-family="Garamond,serif" font-size="11pt">
> <fo:block space-after="6pt" font-weight="bold" space-before="18pt" font-family="Helvetica,sans-serif" keep-with-next="always" color="#000000" font-size="12pt">1   test</fo:block>
> </fo:block>
> </fo:flow>
> </fo:page-sequence>
> </fo:root>
> {code}
> No open tag fo:root in document.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (DOXIA-403) FO module creating non-wellformed xls-fo output

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/DOXIA-403?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukas Theussl closed DOXIA-403.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 1.1.5
         Assignee: Lukas Theussl

I have corrected the example snippet, [r1089880|http://svn.apache.org/viewvc?rev=1089880&view=rev]. The beginDocument()/endDocument() are currently required by the FOSink.

> FO module creating non-wellformed xls-fo output 
> ------------------------------------------------
>
>                 Key: DOXIA-403
>                 URL: http://jira.codehaus.org/browse/DOXIA-403
>             Project: Maven Doxia
>          Issue Type: Bug
>          Components: Module - FO
>    Affects Versions: 1.1.3
>            Reporter: Sergey Shikov
>            Assignee: Lukas Theussl
>             Fix For: 1.1.5
>
>
> This code, copy&pasted from Doxia site, producing non-wellformed FO document:
> Java:
> {code}
> try {
> 	// Open input apt document:
> 	StringReader source= new StringReader("h1. test");
> 	// Create FO sink:
> 	Writer writer = new StringWriter();
> 	FoSink fosink= new FoSink(writer);
> 	Parser parser= new ConfluenceParser();
> 	parser.parse(source, fosink);
> 	// close streams
> 	fosink.close();
> 	source.close();
> 	System.out.println(writer.toString());
> } catch (ParseException e) {
> 	e.printStackTrace();
> } catch (IOException e) {
> 	e.printStackTrace();
> }
> {code}
> Result:
> {code:xml}
> <fo:page-sequence initial-page-number="0" master-reference="body">
> <fo:flow flow-name="xsl-region-body">
> <fo:block white-space-collapse="true" line-height="12pt" font-family="Garamond,serif" font-size="11pt">
> <fo:block space-after="6pt" font-weight="bold" space-before="18pt" font-family="Helvetica,sans-serif" keep-with-next="always" color="#000000" font-size="12pt">1   test</fo:block>
> </fo:block>
> </fo:flow>
> </fo:page-sequence>
> </fo:root>
> {code}
> No open tag fo:root in document.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DOXIA-403) FO module creating non-wellformed xls-fo output

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/DOXIA-403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=231904#action_231904 ] 

Lukas Theussl commented on DOXIA-403:
-------------------------------------

You are right, the begin/endDocument calls are required for the FOSink. This doesn't seem to be sensible though, I need to check if this is necessary.

> FO module creating non-wellformed xls-fo output 
> ------------------------------------------------
>
>                 Key: DOXIA-403
>                 URL: http://jira.codehaus.org/browse/DOXIA-403
>             Project: Maven Doxia
>          Issue Type: Bug
>          Components: Module - FO
>    Affects Versions: 1.1.3
>            Reporter: Sergey Shikov
>
> This code, copy&pasted from Doxia site, producing non-wellformed FO document:
> Java:
> {code}
> try {
> 	// Open input apt document:
> 	StringReader source= new StringReader("h1. test");
> 	// Create FO sink:
> 	Writer writer = new StringWriter();
> 	FoSink fosink= new FoSink(writer);
> 	Parser parser= new ConfluenceParser();
> 	parser.parse(source, fosink);
> 	// close streams
> 	fosink.close();
> 	source.close();
> 	System.out.println(writer.toString());
> } catch (ParseException e) {
> 	e.printStackTrace();
> } catch (IOException e) {
> 	e.printStackTrace();
> }
> {code}
> Result:
> {code:xml}
> <fo:page-sequence initial-page-number="0" master-reference="body">
> <fo:flow flow-name="xsl-region-body">
> <fo:block white-space-collapse="true" line-height="12pt" font-family="Garamond,serif" font-size="11pt">
> <fo:block space-after="6pt" font-weight="bold" space-before="18pt" font-family="Helvetica,sans-serif" keep-with-next="always" color="#000000" font-size="12pt">1   test</fo:block>
> </fo:block>
> </fo:flow>
> </fo:page-sequence>
> </fo:root>
> {code}
> No open tag fo:root in document.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DOXIA-403) FO module creating non-wellformed xls-fo output

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/DOXIA-403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=231880#action_231880 ] 

Lukas Theussl commented on DOXIA-403:
-------------------------------------

Where does this code snippet come from?

> FO module creating non-wellformed xls-fo output 
> ------------------------------------------------
>
>                 Key: DOXIA-403
>                 URL: http://jira.codehaus.org/browse/DOXIA-403
>             Project: Maven Doxia
>          Issue Type: Bug
>          Components: Module - FO
>    Affects Versions: 1.1.3
>            Reporter: Sergey Shikov
>
> This code, copy&pasted from Doxia site, producing non-wellformed FO document:
> Java:
> {code}
> try {
> 	// Open input apt document:
> 	StringReader source= new StringReader("h1. test");
> 	// Create FO sink:
> 	Writer writer = new StringWriter();
> 	FoSink fosink= new FoSink(writer);
> 	Parser parser= new ConfluenceParser();
> 	parser.parse(source, fosink);
> 	// close streams
> 	fosink.close();
> 	source.close();
> 	System.out.println(writer.toString());
> } catch (ParseException e) {
> 	e.printStackTrace();
> } catch (IOException e) {
> 	e.printStackTrace();
> }
> {code}
> Result:
> {code:xml}
> <fo:page-sequence initial-page-number="0" master-reference="body">
> <fo:flow flow-name="xsl-region-body">
> <fo:block white-space-collapse="true" line-height="12pt" font-family="Garamond,serif" font-size="11pt">
> <fo:block space-after="6pt" font-weight="bold" space-before="18pt" font-family="Helvetica,sans-serif" keep-with-next="always" color="#000000" font-size="12pt">1   test</fo:block>
> </fo:block>
> </fo:flow>
> </fo:page-sequence>
> </fo:root>
> {code}
> No open tag fo:root in document.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DOXIA-403) FO module creating non-wellformed xls-fo output

Posted by "Sergey Shikov (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/DOXIA-403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=231873#action_231873 ] 

Sergey Shikov commented on DOXIA-403:
-------------------------------------

Probably code sample should be fixed (add sink.beginDocument/sink.endDocument calls).

> FO module creating non-wellformed xls-fo output 
> ------------------------------------------------
>
>                 Key: DOXIA-403
>                 URL: http://jira.codehaus.org/browse/DOXIA-403
>             Project: Maven Doxia
>          Issue Type: Bug
>          Components: Module - FO
>    Affects Versions: 1.1.3
>            Reporter: Sergey Shikov
>
> This code, copy&pasted from Doxia site, producing non-wellformed FO document:
> Java:
> try {
> 	// Open input apt document:
> 	StringReader source= new StringReader("h1. test");
> 	// Create FO sink:
> 	Writer writer = new StringWriter();
> 	FoSink fosink= new FoSink(writer);
> 	Parser parser= new ConfluenceParser();
> 	parser.parse(source, fosink);
> 	// close streams
> 	fosink.close();
> 	source.close();
> 	System.out.println(writer.toString());
> } catch (ParseException e) {
> 	e.printStackTrace();
> } catch (IOException e) {
> 	e.printStackTrace();
> }
> Result:
> <fo:page-sequence initial-page-number="0" master-reference="body">
> <fo:flow flow-name="xsl-region-body">
> <fo:block white-space-collapse="true" line-height="12pt" font-family="Garamond,serif" font-size="11pt">
> <fo:block space-after="6pt" font-weight="bold" space-before="18pt" font-family="Helvetica,sans-serif" keep-with-next="always" color="#000000" font-size="12pt">1   test</fo:block>
> </fo:block>
> </fo:flow>
> </fo:page-sequence>
> </fo:root>
> No open tag fo:root in document.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DOXIA-403) FO module creating non-wellformed xls-fo output

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/DOXIA-403?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukas Theussl updated DOXIA-403:
--------------------------------

    Description: 
This code, copy&pasted from Doxia site, producing non-wellformed FO document:

Java:
{code}
try {
	// Open input apt document:
	StringReader source= new StringReader("h1. test");

	// Create FO sink:
	Writer writer = new StringWriter();
	FoSink fosink= new FoSink(writer);

	Parser parser= new ConfluenceParser();
	parser.parse(source, fosink);

	// close streams
	fosink.close();
	source.close();

	System.out.println(writer.toString());
} catch (ParseException e) {
	e.printStackTrace();
} catch (IOException e) {
	e.printStackTrace();
}
{code}

Result:

{code:xml}
<fo:page-sequence initial-page-number="0" master-reference="body">
<fo:flow flow-name="xsl-region-body">

<fo:block white-space-collapse="true" line-height="12pt" font-family="Garamond,serif" font-size="11pt">

<fo:block space-after="6pt" font-weight="bold" space-before="18pt" font-family="Helvetica,sans-serif" keep-with-next="always" color="#000000" font-size="12pt">1   test</fo:block>
</fo:block>

</fo:flow>
</fo:page-sequence>
</fo:root>
{code}

No open tag fo:root in document.

  was:
This code, copy&pasted from Doxia site, producing non-wellformed FO document:

Java:
try {
	// Open input apt document:
	StringReader source= new StringReader("h1. test");

	// Create FO sink:
	Writer writer = new StringWriter();
	FoSink fosink= new FoSink(writer);

	Parser parser= new ConfluenceParser();
	parser.parse(source, fosink);

	// close streams
	fosink.close();
	source.close();

	System.out.println(writer.toString());
} catch (ParseException e) {
	e.printStackTrace();
} catch (IOException e) {
	e.printStackTrace();
}

Result:

<fo:page-sequence initial-page-number="0" master-reference="body">
<fo:flow flow-name="xsl-region-body">



<fo:block white-space-collapse="true" line-height="12pt" font-family="Garamond,serif" font-size="11pt">

<fo:block space-after="6pt" font-weight="bold" space-before="18pt" font-family="Helvetica,sans-serif" keep-with-next="always" color="#000000" font-size="12pt">1   test</fo:block>
</fo:block>

</fo:flow>
</fo:page-sequence>
</fo:root>

No open tag fo:root in document.


> FO module creating non-wellformed xls-fo output 
> ------------------------------------------------
>
>                 Key: DOXIA-403
>                 URL: http://jira.codehaus.org/browse/DOXIA-403
>             Project: Maven Doxia
>          Issue Type: Bug
>          Components: Module - FO
>    Affects Versions: 1.1.3
>            Reporter: Sergey Shikov
>
> This code, copy&pasted from Doxia site, producing non-wellformed FO document:
> Java:
> {code}
> try {
> 	// Open input apt document:
> 	StringReader source= new StringReader("h1. test");
> 	// Create FO sink:
> 	Writer writer = new StringWriter();
> 	FoSink fosink= new FoSink(writer);
> 	Parser parser= new ConfluenceParser();
> 	parser.parse(source, fosink);
> 	// close streams
> 	fosink.close();
> 	source.close();
> 	System.out.println(writer.toString());
> } catch (ParseException e) {
> 	e.printStackTrace();
> } catch (IOException e) {
> 	e.printStackTrace();
> }
> {code}
> Result:
> {code:xml}
> <fo:page-sequence initial-page-number="0" master-reference="body">
> <fo:flow flow-name="xsl-region-body">
> <fo:block white-space-collapse="true" line-height="12pt" font-family="Garamond,serif" font-size="11pt">
> <fo:block space-after="6pt" font-weight="bold" space-before="18pt" font-family="Helvetica,sans-serif" keep-with-next="always" color="#000000" font-size="12pt">1   test</fo:block>
> </fo:block>
> </fo:flow>
> </fo:page-sequence>
> </fo:root>
> {code}
> No open tag fo:root in document.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira