}
private void processLink(RenderingContext c, Box box) {
Element elem = box.getElement();
if (elem != null) {
NamespaceHandler handler = _sharedContext.getNamespaceHandler();
String uri = handler.getLinkUri(elem);
if (uri != null) {
if (uri.length() > 1 && uri.charAt(0) == '#') {
String anchor = uri.substring(1);
Box target = _sharedContext.getBoxById(anchor);
if (target != null) {
PdfDestination dest = createDestination(c, target);
PdfAction action = new PdfAction();
if (!"".equals(handler.getAttributeValue(elem, "onclick"))) {
action = PdfAction.javaScript(handler.getAttributeValue(elem, "onclick"), _writer);
} else {
action.put(PdfName.S, PdfName.GOTO);
action.put(PdfName.D, dest);
}