Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to ensure that an Xml element is not blank 1

Status
Not open for further replies.

KG0102

Technical User
Oct 15, 2007
5
Hi I am new to sharepoint and want to ensure that none of the tags in our tenmplate is left blank can anybody help.

Regards,
KG0102
 
Hi tsuji,
Actually I just want to know is there any function etc in XSLT that recognises that a a mandatory XML tag has been left blank and throws an error.


Regards,
KG0102
 
It seems that depends on how the test appears. For instance in xslt, you can use normalize-space() and length() xslt functions supported in v1.0 up. As to "throws an error", xslt won't do it. You can show a message to that effect. To throw an error, it should be conditioned that the processing is in some other language which can throw exception (java/php/perl/c) or, to the same effect apart from the name, raise an error object (such a vbs/vb...)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top