The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Correct DTD for Tag Library for exam Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "Correct DTD for Tag Library for exam" Watch "Correct DTD for Tag Library for exam" New topic
Author

Correct DTD for Tag Library for exam

Clark Bruce
Greenhorn

Joined: Feb 27, 2002
Posts: 17
I just noticed the difference in the element formation between the 1.1 and the 1.2 DTD for Tag Library Descriptors (tlibversion (1.1) vs tlib-version (1.2) etc.).
I would assume that the correct version to use is 1.2 DTD, but I cannot be sure from reading the exam requirements. Most of the study notes and books use the old version.
Could someone please let me know which one to study.
Thanks,
Clark
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 16617

Yeah, go to the links link above, and download ersin's DTD guide. It has the correct tags, and in the order, and in a visual way to make it easier to memorize.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Clark Bruce
Greenhorn

Joined: Feb 27, 2002
Posts: 17
Thanks Mark
Regards,
Clark
Clark Bruce
Greenhorn

Joined: Feb 27, 2002
Posts: 17
Mark,
I just reviewed Ersin's info. It great! However, unless I'm missing something, it seems to be for setting up the web.xml Deployment Description.
What I am asking about is the DTD to set up the .tld file for a custom tag library.
Has the exam been updated to use the new hyphenated tags in the 1.2 DTD?
Regards,
Clark
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 16617

Ah, the custom tag library. You do need to know that one too. Actually we are lucky that is it short.
I know I pretty much learned it from the notes. Like Ken's or someone elses.
Let's see you have the Tag tag, and underneath that you have the attribute tag that has some child tags. The attribut child tags are <rtexprvalue> for saying whether this attribute can be determined at run-time. <required> states that it must be in there.
<body-content> states what would be the acceptable stuff in between the tag. the default is JSP.
There really isn't much more that you really need for the exam. Well that's based on the questions I received.
Good Luck
Mark
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
The dtd for the taglib is on page 237 of the JSP1.2 Specs. You can also download it. Both links are available from the links page.


I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
Clark Bruce
Greenhorn

Joined: Feb 27, 2002
Posts: 17
Thanks guys.
Regards,
Clark
Tim Duncan
Ranch Hand

Joined: Aug 20, 2001
Posts: 150
Originally posted by Carl Trusiak:
The dtd for the taglib is on page 237 of the JSP1.2 Specs.

Actually p.237 is the DTD for JSP 1.1 TLD (the one for 1.2 is on p.225). However, it does say something important, it starts:

This appendix includes the DTD for a tag library descriptor using JSP 1.1.
All JSP 1.2 containers are required to accept such a TLD.

So, I guess that unless you get a question which explicitly mentions 1.1 or 1.2 (or refers to a particular DTD) then either version should be acceptable :-)
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
Actually p.237 is the DTD for JSP 1.1 TLD (the one for 1.2 is on p.225). However, it does say something important, it starts:
My copy does show Tags specs according to 1.2 on page 237. If it helps, the title on that page says:
"APPENDIX JSP.C DTD for TagLibrary Descriptor, JSP 1.2" :roll:
You might want to check what version of Specs you have.
- satya


Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Tim Duncan
Ranch Hand

Joined: Aug 20, 2001
Posts: 150
Originally posted by Madhav Lakkapragada:
My copy does show Tags specs according to 1.2 on page 237.

Ok, to be precise ... the page which has "225" printed on it, and which Acrobat refers to as page 237 ...
Anyway, point is that the 1.2 spec mandates that containers must accept 1.1 and 1.2 versions of the DTD.
 
 
subject: Correct DTD for Tag Library for exam
 
Threads others viewed
tld placement to support JSP 1.1 and 1.2
Element type "tlibversion" must be declared
Error When starting Tomcat server
Obtaining Javadoc for the JSTL tag library, version 1.2
TLD question
MyEclipse, The Clear Choice