• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

XML Namespace Spec

 
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now this question of niko's

Q.7 Is this a valid use of header.tag, a JSP tag file that is located in WEB-INF/tags? (1 correct answer)

<%@ taglib prefix="1" tagdir="/WEB-INF/tags" %>
<html>
<body>
<1:header />
</body>
</html>

1. Yes.
2. No.
Answer: 1

Here 1 is used as a prefix . Spec says

A prefix must follow the naming convention specified in the
XML namespaces specification.



What is XML namespaces specification? Where can we get it from?
 
Creator of Enthuware JWS+ V6
Posts: 3395
312
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have no idea where you can get the XML namespaces specification, and how you should read it (I found one at w3c, but that one disallows digits as prefixes...)

The important thing to remember for the exam is the following:

Empty prefixes are illegal. If you are developing or using custom tags, you cannot use the tag prefixes jsp, jspx, java, javax, servlet, sun, and sunw, as they are reserved by Sun Microsystems


Funny enough you can also use an underscore as a valid prefix.

Regards,
Frits
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You'll find the grammatical rules of the namespace here.

NCName ::= (Letter | '_') (NCNameChar)*
NCNameChar ::= Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender

The namespace must start with a letter or an underscore. But as Frits said, you don't need to remember this for the exam.
 
Parth Twari
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok thanks..
 
Frits Walraven
Creator of Enthuware JWS+ V6
Posts: 3395
312
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, then I was looking in the same place as Christophe.

Again this is a question where the answer is questionable: Tomcat allows it but according to the rules it should not have been possible...

Regards,
Frits
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic