Maven 1.x XDoc Plugin

xdoc with XML entities goes wierd

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.10
  • Component/s: None
  • Labels:
    None
  • Environment:
    windows xp, JDK 1.4.1
  • Number of attachments :
    0

Description

I'm having a problem using XML entities inside xdoc files.

I like to create XML entities for my XML documentation for common things like links to API docs, or to descriptions of my schemas.

So, I have a file, services.xml, which begins:

<?xml version="1.0"?>
<!DOCTYPE document [
<!ENTITY % common-links SYSTEM "../common/links.xml">
%common-links;
]>

Inside common/links.xml I have stuff like:

<!ENTITY _module '<module>'>
<!ENTITY module '<a href="descriptor.html#module">&_module;</a>'>

And that works properly in my docs; <module> appears as a link when I use
&module; in the document.

However, if you do something simpler it fails:

<!ENTITY api.IFactory 'IFactory'>

Appears in the output as a blank space.

<!ENTITY api.IFactory '<IFactory>'>

Appears as: <IFactory>

<!ENTITY api.IFactory '[IFactory]'>

Appears as: ]

<!ENTITY api.IFactory '<a
href="apidocs/org/apache/commons/hivemind/IFactory.html">IFactory</a>'>

Appears as:
<a href="apidocs/org/apache/commons/hivemind/IFactory.html">
tory
</a>

Something appears screwed up in the xdoc processing pipeline. Does this all sound familiar?

Alternately, is there another way to accomplish my goals (using some kind of Velocity markup?)

Issue Links

Activity

Hide
Howard M. Lewis Ship added a comment -

If you want to see the real sources, this is part of HiveMind (http://jakarta.apache.org/commons/sandbox/hivemind). You can, obviously, get latest from CVS and build using Maven.

You poor suckers ... you've created a system where the easiest test case is: download my project and build it for me!

Show
Howard M. Lewis Ship added a comment - If you want to see the real sources, this is part of HiveMind (http://jakarta.apache.org/commons/sandbox/hivemind). You can, obviously, get latest from CVS and build using Maven. You poor suckers ... you've created a system where the easiest test case is: download my project and build it for me!
Hide
Ben Walding added a comment -

This smells like something Jelly/JSL would be doing to us. Send the army of Strachan Jelly Coderbots.

Show
Ben Walding added a comment - This smells like something Jelly/JSL would be doing to us. Send the army of Strachan Jelly Coderbots.
Hide
dion gillard added a comment -

Will download hivemind and see how it goes

Show
dion gillard added a comment - Will download hivemind and see how it goes
Hide
Howard M. Lewis Ship added a comment -

Edit common/links.xml and then maven xdoc to see what I'm talking about.

Show
Howard M. Lewis Ship added a comment - Edit common/links.xml and then maven xdoc to see what I'm talking about.
Hide
Brett Porter added a comment -

this definitely seems to be a jelly bug, coming down to line 587 of site:jsl:

<!-- copy any other elements through -->
<jsl:template match="*" trim="false">
<jsl:copy trim="false">
<jsl:applyTemplates trim="false"/>
</jsl:copy>
</jsl:template>

I've found that <jsl:copyOf select="."/> gives
&api.IFactory;IFactory (so evaluating it as an expression, then correctly displaying it).

I'm having a quick look at Jelly now, but in my opinion this shouldn't be blocking beta-10

Show
Brett Porter added a comment - this definitely seems to be a jelly bug, coming down to line 587 of site:jsl: <!-- copy any other elements through --> <jsl:template match="*" trim="false"> <jsl:copy trim="false"> <jsl:applyTemplates trim="false"/> </jsl:copy> </jsl:template> I've found that <jsl:copyOf select="."/> gives &api.IFactory;IFactory (so evaluating it as an expression, then correctly displaying it). I'm having a quick look at Jelly now, but in my opinion this shouldn't be blocking beta-10
Hide
Brett Porter added a comment -

need for time to enlist the jellybots

Show
Brett Porter added a comment - need for time to enlist the jellybots
Hide
Lukas Theussl added a comment -

This works in Maven 1.1 with jsl:copyOf instead of jsl:copy. I hope this doesn't break anything else though...

Show
Lukas Theussl added a comment - This works in Maven 1.1 with jsl:copyOf instead of jsl:copy. I hope this doesn't break anything else though...

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: