D
dado0583
Hi, I'm building an XSLT editor, and it does XSLT transformations using
the javax.xml.transform library. When there is a problem with the
stylesheet, e.g. a missing tag, or an element not having a required
attribute, it throws a TransformerException.
I want to get the line number of the source of the problem to give
back to the user so they can find where they are going wrong. I get the
SourceLocator object from the TransformerException, however, it is
always null and therefore I can't get the line number of the problem?
Can anyone give me any insights?
public void alertError(TransformerException e){
SourceLocator sl = e.getLocator();
//sl is always null!
}
the javax.xml.transform library. When there is a problem with the
stylesheet, e.g. a missing tag, or an element not having a required
attribute, it throws a TransformerException.
I want to get the line number of the source of the problem to give
back to the user so they can find where they are going wrong. I get the
SourceLocator object from the TransformerException, however, it is
always null and therefore I can't get the line number of the problem?
Can anyone give me any insights?
public void alertError(TransformerException e){
SourceLocator sl = e.getLocator();
//sl is always null!
}