Next Level Articles Homepage.
Translate Page To German Tranlate Page To Spanish Translate Page To French Translate Page To Italian Translate Page To Japanese Translate Page To Korean Translate Page To Portuguese Translate Page To Chinese
  Number Times Read : 30      
Categories

Accessories
Arts
Business
Career
Cars and Trucks
CGI
Christianity
Coding Sites
Computers
Computers and Technology
Cooking
Crafts
Current Affairs
Databases
Entertainment
Film
Finances
Gardening
Healthy Living
Holidays
Home
Home Management
Internet
Medical
Medical Business
Men Only
Motorcyles
Our Pets
Outdoors
Relationships
Religion
Self Help
Self Improvement
Society
Sports
Staying Fit
Technology
Travel
Web Design
Weddings
Women Only
Womens Interest
World Affairs
Writing
 
Stats
Total Articles: 29
Total Authors: 104482
Total Downloads: 2380419


Newest Member
James Geto

 


   

Avoid Common XSLT Mistakes



[Valid RSS feed]  Category Rss Feed - http://www.articlesbacklink.com/rss.php?rss=32
By : Jamie Simpson   

Many common XSLT mistakes can often be avoided by using a good XSLT editor. There are several good ones around. Some of them are free. But if you are old school and like to hand code then look out for the following common errors that many programmers make.

Stay away from disable-output-escaping. This is for experienced programmers and even they are reluctant to use it 99 percent of the time. If you're modifying code and see disable-output-escaping being used then you can be sure the author did not know what he was doing. In 2.0 disable-output-escaping it is depreciated and processors no longer support it.

The next common error is using relative paths. The most common mistake is to use an absolute path within a loop. Paths need to be written starting from the context node. This is a must if you want to avoid a lot of errors. Remember relative paths should be preceded with "~/". Another common problem with relative paths happens when including and exporting to Java. When loading as a stream source if you do not set the system ID the processor does not know where the XSLT is and cannot resolve relative paths. By setting the system ID in a stream source you're telling processor where the commonFooter.xslt is located. After this is done double check that you're actually using the right path with your XSLT editor. This is a crucial last step. You'd be surprised how many errors can be eliminated by double checking the path. This is just a good programming habit too.

Everyone makes mistakes with namespaces. There are no easy answers. Make sure your elements are in the right namespace. Understanding that every element has a name which compromises a prefix and that all elements own their namespace node is best. This will help you to understand the various instructions and how they work together in the result tree. This takes care of most problems that arise with namespaces.

It is highly recommended to use an XSLT editor and avoid coding by hand. This alone will cut down on many errors. As mentioned above there are several good ones. Stylus Studio's editor is feature filled. There is also XMLSpy editor. If you want to develop quick error free style sheets than either of these two will do the job.

If you're just starting out Treebeard will fill your needs and it's free.

1st page google ranking
Author Resource:- With Liquid XSLT editor you can easily create, edit, test and validate XSLT documents
Article From Articles Back Link

Related Articles

HTML Ready Article. Click on the "Copy" button to copy into your clipboard.




Firefox users please select/copy/paste as usual
Rate This Article
Vote to see the results!

Do you like this article?
  • Yes.
  • Not Sure.
  • No.
New Members
 
select
Sign up
select
Learn more
 
 
Nav Menu
Home
Login
Submit Articles
Submission Guidelines
Top Articles
Link Directory
About Us
Contact Us
Privacy Policy
RSS Feeds

Actions
Print This Article
Add To Favorites

 
Sponsors