private void initAttribute(FxNode node, String atQName) { NodeInfo ni = i(node); ni.makeAttribute(); int[] offsets = contentLocator.getAttributeOffsets(atQName); ni.startAt(offsets[ContentLocator.OFFSET_START]) .endsAt(offsets[ContentLocator.OFFSET_END]) .startContent(offsets[ContentLocator.OFFSET_VALUE_START]) .endContent(offsets[ContentLocator.OFFSET_VALUE_END]); }
private void addAttributeError(String qName, String code, String message, Object... params) { int[] offsets = contentLocator.getAttributeOffsets(qName); int s; if (offsets == null) { FxNode n = nodeStack.peek(); if (n != null) { s = i(n).getStart(); } else { s = -1; } } else { s = offsets[ContentLocator.OFFSET_START]; } addError(new ErrorMark(s, qName.length(), code, message, params)); }