• Post Reply Bookmark Topic Watch Topic
  • New Topic

tld question  RSS feed

 
Paolo Metafune
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I red on manning book that a tld file, being a xml, must respect the order of tags.

I have this tld
***********************************+
<!DOCTYPE taglib PUBLIC
"-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
"http://java.sun.com/j2ee/dtd/web-jsptaglibrary_1_2.dtd">

<taglib>
<tlib-version>1.0</tlib-version>
<jsp-version>2.0</jsp-version>
<uri>MyCustomTagKey</uri>
<tag>
<name>myCustom</name>
<tag-class>mypackage.MyCustomTag</tag-class>
<body-content>tagdependent</body-content>
</tag>
</taglib>
********************************
can you tell me why it works also if, for instance, i move the uri tag before tlib-version ?
 
Sergey Tyulkin
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have 2 suggestions:
1) Container uses non-validating xml parser.
2) Container uses PUBLIC uri, and uses more appropriate DTD, or even schema to parse the file.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!