aspose file tools*
The moose likes JSP and the fly likes XML Compatible syntax --advantages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "XML Compatible syntax --advantages" Watch "XML Compatible syntax --advantages" New topic
Author

XML Compatible syntax --advantages

Satish Kota
Ranch Hand

Joined: Feb 08, 2006
Posts: 88
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.


SCJP 5.0 77%
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61417
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61417
    
  67

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

Joined: Feb 08, 2006
Posts: 88
Okey.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XML Compatible syntax --advantages