jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 1.x XDoc Plugin
  • MPXDOC-118

[PATCH] Allow xdoc templates to escape XML

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Trivial Trivial
  • Resolution: Fixed
  • Affects Version/s: 1.9
  • Fix Version/s: 1.9
  • Labels:
    None

Description

It would be very useful if site.jsl offered a tag we could use to escape XML text. This is particularly useful when you need to include the contents of another XML file into your xdoc, as described below:

1.The way it is now, the code included inside the <source> tags won't be escaped and hence won't be rendered (as the browser will ignore the unknown XML tags)
<source>
&xmlBeingIncluded;
</source>

2.With the patch I'm including, we would use:
<source>
<escapeXml>
&xmlBeingIncluded;
</escapeXml>
</source>

Besides the patch, I'm providing a simple test case ilustrating the issue.

in the test case provided with the patch.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    mpxdoc-118.patch
    03/Aug/04 11:39 PM
    2 kB
    Felipe Leme
  2. Hide
    Zip Archive
    testcase-mpxdoc-118.zip
    03/Aug/04 11:40 PM
    0.8 kB
    Felipe Leme
    1. XML File
      test-mpxdoc-118/project.xml 0.2 kB
    2. XML File
      test-mpxdoc-118/xdocs/index.xml 0.6 kB
    Download Zip
    Show
    Zip Archive
    testcase-mpxdoc-118.zip
    03/Aug/04 11:40 PM
    0.8 kB
    Felipe Leme
  1. Screenshot-MPXDOC-118.png
    129 kB
    03/Aug/04 11:42 PM

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Felipe Leme added a comment - 03/Aug/04 11:39 PM

Proposed patch.

Show
Felipe Leme added a comment - 03/Aug/04 11:39 PM Proposed patch.
Hide
Permalink
Felipe Leme added a comment - 03/Aug/04 11:40 PM

Test case - just run 'maven xdoc' on it and see the results...

Show
Felipe Leme added a comment - 03/Aug/04 11:40 PM Test case - just run 'maven xdoc' on it and see the results...
Hide
Permalink
Felipe Leme added a comment - 03/Aug/04 11:42 PM

Screenshot of the test case

Show
Felipe Leme added a comment - 03/Aug/04 11:42 PM Screenshot of the test case
Hide
Permalink
dion gillard added a comment - 04/Aug/04 12:14 AM

What's wrong with <![CDATA[ stuff ]]> ?

Show
dion gillard added a comment - 04/Aug/04 12:14 AM What's wrong with <![CDATA[ stuff ]]> ?
Hide
Permalink
Felipe Leme added a comment - 04/Aug/04 12:22 AM

It doesn't work with included XML (at least I couldn't get it to , as shown in the test case. It work with code like this:

<[CDATA[
<bla-bla-bla>
</bla-bla-bla>
]]>

In fact, that's what we were using in the document that originated this patch. But that contenct came from a dinamic XML, so we rather included that file than copy and paste its content again everytime it changes.

But if you try:
<[CDATA[
&myIncludedXml;
]]>

the result would be only:

&myIncludedXml;

Show
Felipe Leme added a comment - 04/Aug/04 12:22 AM It doesn't work with included XML (at least I couldn't get it to , as shown in the test case. It work with code like this: <[CDATA[ <bla-bla-bla> </bla-bla-bla> ]]> In fact, that's what we were using in the document that originated this patch. But that contenct came from a dinamic XML, so we rather included that file than copy and paste its content again everytime it changes. But if you try: <[CDATA[ &myIncludedXml; ]]> the result would be only: &myIncludedXml;
Hide
Permalink
Felipe Leme added a comment - 08/Dec/04 9:19 AM

Could I commit this change? Any objection?

Show
Felipe Leme added a comment - 08/Dec/04 9:19 AM Could I commit this change? Any objection?
Hide
Permalink
Arnaud Heritier added a comment - 08/Dec/04 1:45 PM

ok for me, but it must be documented.

Show
Arnaud Heritier added a comment - 08/Dec/04 1:45 PM ok for me, but it must be documented.
Hide
Permalink
Felipe Leme added a comment - 12/Dec/04 4:12 PM

Fixed (and documented

Show
Felipe Leme added a comment - 12/Dec/04 4:12 PM Fixed (and documented

People

  • Assignee:
    Felipe Leme
    Reporter:
    Felipe Leme
Vote (0)
Watch (0)

Dates

  • Created:
    03/Aug/04 11:31 PM
    Updated:
    12/Dec/04 4:12 PM
    Resolved:
    12/Dec/04 4:12 PM

Time Tracking

Estimated:
10m
Original Estimate - 10 minutes
Remaining:
10m
Remaining Estimate - 10 minutes
Logged:
Not Specified
Time Spent - Not Specified
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.