The following comment has been added to this issue:
Author: Andrew Stevens
Created: Sat, 15 Jan 2005 3:21 AM
Body:
According to the 2.2 and 2.3 DTDs, context-param is defined as
<!ELEMENT context-param (param-name, param-value, description?)>
so the template is putting it in the correct place. If eclipse complains, then
that's eclipse's problem. Most likely, it's trying to validate the generated
web.xml with the 2.4 XML Schema; in that, context-param is a param-valueType,
which defines the decription to be first. However, the current module doesn't
support 2.4 yet.
Only including the description when there is one is a good idea, though.
---------------------------------------------------------------------
View this comment:
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1223?page=comments#action_15624
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1223
Here is an overview of the issue:
---------------------------------------------------------------------
Key: XDT-1223
Summary: Using context-params creates invalid web.xml
Type: Bug
Status: Open
Priority: Minor
Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown
Project: XDoclet
Components:
Web Module
Versions:
1.2.2
Assignee: xdoclet-devel (Use for new issues)
Reporter: Klaus Reimer
Created: Fri, 7 Jan 2005 2:12 AM
Updated: Sat, 15 Jan 2005 3:21 AM
Environment: Java 1.5, Linux, Eclipse 3.0
Description:
I have added a contextparam tag to the webdoclet task like this:
<deploymentdescriptor ...>
<contextparam name="..." value="..." />
</deploymentdescriptor>
Running xdoclet ends up with a web.xml containing this:
<context-param>
<param-name>...</param-name>
<param-value>...</param-value>
<description><![CDATA[]]></description>
</context-param>
First issue is that I don't want this desciption tag there because I have not
added a description in the contextparam tag in my build.xml. But this is not
important. More important is, that Eclipse says the web.xml is invalid because
it expects the optional description tag to be the FIRST element in a
context-param block.
Here is a patch for the web_xml.xdt to solve both issues:
--- web_xml.xdt.old 2004-10-09 01:01:19.000000000 +0200
+++ web_xml.xdt 2005-01-07 09:09:28.000000000 +0100
@@ -24,9 +24,11 @@
<XDtConfig:forAllConfigParameters paramName="contextParams">
<context-param>
+ <XDtConfig:ifConfigParamNotEquals paramName="contextParams.description"
value="">
+ <description><![CDATA[<XDtConfig:configParameterValue
paramName="contextParams.description"/>]]></description>
+ </XDtConfig:ifConfigParamNotEquals>
<param-name><XDtConfig:configParameterValue
paramName="contextParams.name"/></param-name>
<param-value><XDtConfig:configParameterValue
paramName="contextParams.value"/></param-value>
- <description><![CDATA[<XDtConfig:configParameterValue
paramName="contextParams.description"/>]]></description>
</context-param>
</XDtConfig:forAllConfigParameters>
</XDtMerge:merge>
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
xdoclet-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel