aspose file tools*
The moose likes XML and Related Technologies and the fly likes How to get an id of a node? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How to get an id of a node?" Watch "How to get an id of a node?" New topic
Author

How to get an id of a node?

Jeya Balaji
Ranch Hand

Joined: Jan 02, 2003
Posts: 40
I am using tomcat 4.1 and jdk 1.3
While validating custom tag lib, the validate method of TagLibraryValidator accepts pagedata (an xml doc) and returns ValidationMessage array.
The api describe the constructor of ValidationMessage like this :
public ValidationMessage(java.lang.String�id, java.lang.String�message)
Create a ValidationMessage. The message String should be non-null. The value of id may be null, if the message is not specific to any XML element, or if no jsp:id attributes were passed on. If non-null, the value of id must be the value of a jsp:id attribute for the PageData passed into the validate() method.
Parameters:
id - Either null, or the value of a jsp:id attribute.
message - A localized validation message.

I am not very clear about the jsp:id. Should I pass a string (like "<mytag:foo>") which will indicate the tag causing the problem?
What is the meaning of "If non-null, the value of id must be the value of a jsp:id attribute for the PageData" ?
This id param is used while displaying the problem, like :
id : the problem description
Earlier, I posted this question in jsp forum and couldn't get an answer there.
This issue is not a major one in my project - but just a small hitch. I would like to fix it by understanding the id field or pass null.
Thanks,
Balaji


Regards, Balaji
 
 
subject: How to get an id of a node?