tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Schneider <k...@dotech.com>
Subject Re: How to locate tld file wihin parse error?
Date Tue, 20 Jul 2004 11:39:05 GMT
I usually try to do this sort of validation with Ant during a build. Something
like this:

<property name="j2ee.home" location="C:/j2sdkee1.3.1"/>

<property name="taglib.dtd" value="web-jsptaglibrary_1_2.dtd"/>
<property name="taglib.dtd.publicId"
          value="-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"/>

<xmlcatalog id="dtd">
  <dtd publicId="${taglib.dtd.publicId}"
      
location="jar:file:///${j2ee.home}/lib/j2ee.jar!/javax/servlet/jsp/resources/${taglib.dtd}"/>
</xmlcatalog>

..

<target name="xmlvalidate" depends="build">
  <xmlvalidate lenient="false" warn="true">
    <xmlcatalog refid="dtd"/>
    <fileset dir="${build.dir}/META-INF">
      <include name="*.tld"/>
    </fileset>
  </xmlvalidate>
</target>

<target name="dist" depends="xmlvalidate">
  <jar jarfile="${dist.dir}/${ant.project.name}.jar" basedir="${build.dir}"/>
</target>

Quoting Soledad Tabuenca <stabuenca1985@yahoo.es>:

> Hi!
> 
> When I startup tomcat, I obtain the attached typical
> parsing error because the tags are not in a suitable
> order within a tld file. 
> 
> My question is, is there a way to know which is the
> tld file that contains this parse error?
> 
> In server.xml, I have set the xmlvalidation = "true",
> debugs to a high level and log files (catalina.out,
> log_...) just show the line and column of the error
> but not the name of the file.
> 
> I have more than 20 tld files, and I would like to
> know if there is a better way to find it than
> searching file to file....
> 
> Thanks
> 
> 
> 
> 
> SEVERE: Parse Error at line 20 column 11: The content
> of element type "tag" must match
>
"(name,tag-class,tei-class?,body-content?,display-name?,small-icon?,large-icon?,description?,variable*,attribute*,example?)".
> org.xml.sax.SAXParseException: The content of element
> type "tag" must match
>
"(name,tag-class,tei-class?,body-content?,display-name?,small-icon?,large-icon?,description?,variable*,attribute*,example?)".

-- 
Kris Schneider <mailto:kris@dotech.com>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message