Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML Compatible syntax --advantages

 
Satish Kota
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
i have read in one of the books that a TAGLIB directive can be represented in two ways:
<%@ ------taglib ------ %>

(OR)
<jsp irective.taglib......./>

The second being XML compatible syntax. It also says that expressing a JSP page in XML syntax has a lot of advantages.

As i am a newbie to JSP can u please cite out what are the advantages of using XML compatible syntax in JSP and under what circumstances should i go for XML compatible one.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64856
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Satish Kota:
can u please cite out what are the advantages of using XML compatible syntax in JSP and under what circumstances should i go for XML compatible one.


For hand-coded JSP pages there is no advatnage to using the XML document format -- in fact, you will find that there is so much ancillary markup necessary to keep the XML valid that the page becomes an incomprehensible morass.

The XML document format is meant for containers to use internally, or for pages generated from software where it may be easier to "write" a page by serializing a DOM.

It makes no sense to try and use it otherwise.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64856
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Satish Kota:
can u please


Also, please bear in mind that JavaRanch is a community of people from all over the world, many of who are not native English speakers. While using abbreviations like "u" instead of spelling out "you" is convenient when text messaging your friends on a cell phone or in a chat room, it presents an extra challenge to those that are already struggling with English. Additionally, such shortcuts may confound automated translation tools that patrons of the Ranch may be making use of.

I would like to ask for your help in making the content of JavaRanch a little easier to read for everybody that visits here by not using such abbreviations.

Please read this for more information.

thanks,
bear
JavaRanch Sheriff
 
Satish Kota
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okey.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic