Bug 24863 - permittedTaglibs.tld and scriptfree.tld do not validate in xml parser
Summary: permittedTaglibs.tld and scriptfree.tld do not validate in xml parser
Status: RESOLVED FIXED
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: 1.1
Hardware: All All
: P3 major (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
: 26001 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-11-20 16:04 UTC by Richard Backhouse
Modified: 2004-11-16 19:05 UTC (History)
1 user (show)



Attachments
valid permittedTaglibs.tld (1.15 KB, text/xml)
2003-11-20 16:18 UTC, Richard Backhouse
Details
valid scriptfree.tld (1.70 KB, text/xml)
2003-11-20 16:19 UTC, Richard Backhouse
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Backhouse 2003-11-20 16:04:20 UTC
Both these tlds are invalid and do not parse when validation is set to true. 
Specifically they have the following wrong :

1.)

<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation=
   "http://java.sun.com/xml/ns/j2ee web jsptaglibrary_2_0.xsd"
    version="2.0">

should be 

<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd"
    version="2.0">

2.)
jsp-version is not a valid element in the taglib 2.0 schema

3.)
description sub-elements must always come first within elements
for example :
    <init-param>
      <param-name>permittedTaglibs</param-name>
      <param-value>
	http://java.sun.com/jsp/jstl/core
	http://java.sun.com/jsp/jstl/fmt
	http://java.sun.com/jsp/jstl/sql
	http://java.sun.com/jsp/jstl/xml
      </param-value>
      <description>
        Whitespace-separated list of taglib URIs to permit.  This example
	TLD for the Standard Taglib allows only JSTL 'el' taglibs to be
	imported.
      </description>        
    </init-param>

should be :
    <init-param>
      <description>
        Whitespace-separated list of taglib URIs to permit.  This example
    TLD for the Standard Taglib allows only JSTL 'el' taglibs to be
    imported.
      </description>
      <param-name>permittedTaglibs</param-name>
      <param-value>
    http://java.sun.com/jsp/jstl/core
    http://java.sun.com/jsp/jstl/fmt
    http://java.sun.com/jsp/jstl/sql
    http://java.sun.com/jsp/jstl/xml
      </param-value>
    </init-param>
Comment 1 Richard Backhouse 2003-11-20 16:18:55 UTC
Created attachment 9213 [details]
valid permittedTaglibs.tld
Comment 2 Richard Backhouse 2003-11-20 16:19:21 UTC
Created attachment 9214 [details]
valid scriptfree.tld
Comment 3 Pierre Delisle 2003-12-05 20:33:25 UTC
Indeed, these TLD (as well as jstl-examples.tld) had to be fixed for xml
validation. Many thanks Richard for the report.
Comment 4 Pierre Delisle 2004-01-08 22:03:17 UTC
*** Bug 26001 has been marked as a duplicate of this bug. ***