• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

TLD Doubt

 
Sandeep Vaid
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HFSJ - P-467



Is <tlib-version> and <short-name> mandatory ?
Moreover what about <uri> and <tag> elements. Are they mandatory?


(tlib-version? | uri? | tag?)*

What does this mean. What does '?' mean
[ March 20, 2008: Message edited by: Sandeep Vaid ]
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is <tlib-version> and <short-name> mandatory ? Moreover what about <uri> and <tag> elements. Are they mandatory?

In JSP2.0, only tlib-version and short-name only are mandatory.

(tlib-version? | uri? | tag?)* What does this mean. What does '?' mean

'?' means that the tag is optional (zero or one occurance). (tlib-version? | uri? | tag?)* is strange. Where did you get it from ?
 
Sujit. Singh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sandeep DTD for taglib is :
<!ELEMENT taglib (tlib-version, jsp-version, short-name, uri?,
display-name?, small-icon?, large-icon?, description?,
validator?, listener*, tag+) >

? : At most once, not required
* : Any Number of time, not required
+ : At least once, required and any number of time
nothing : required and once

So, For taglid the required attributes are :
1>tlib-version
2>jsp-version
3>short-name
4> At leat one tag
I think it helps...
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jsp-version ? You are looking at an old DTD. The new 2.0 schema does not specify any jsp-version. Could you tell us which TLD version you are referring to ?
 
Sandeep Vaid
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys...
I also got same conclusion as sujit :

<!ELEMENT taglib (tlib-version, jsp-version, short-name, uri?, display-name?,
small-icon?, large-icon?, description?, validator?, listener*, tag+) >

We are refering to
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library
1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">

This is specified in JSP2.0 Specs and according to this jsp-version is also mandatory !!!
 
swapna rao
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think you people are referring to the wrong TLD .The TLD which you specified is for JSP1.2 version. In JSP 2.0 only tlib-version ,short-name tags are mandatory.This is provided in JSP specification.Refer to the page-400
 
Sandeep Vaid
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
swapna, you are right...
I also posted this but it seems there was a internet connection problem and it didn't got reflected in the forum.


Thanks to you all for clarifying my doubt !!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic