private SimpleConstructor getNodeConstructor(ContextAtExist context, NodeAtExist node, XSLPathExpr content) throws XPathException {
SimpleConstructor constructer = null;
if (node.getNodeType() == Node.ELEMENT_NODE) {
Element element = new Element((XSLContext) context, node.getNodeName());
content.add(element);
XSLPathExpr content_sub = new XSLPathExpr((XSLContext) context);
element.setContent(content_sub);
NamedNodeMap attrs = node.getAttributes();
for (int index = 0; index < attrs.getLength(); index++) {
Node attr = attrs.item(index);
if (("xmlns:".equals(attr.getNodeName())) && ("".equals(attr.getLocalName()))) { //getNodeValue
continue;//UNDERSTAND: is it required, to have empty namespace
}
if (isParentNode()) {
if ("xmlns:xsl".equals(attr.getNodeName())) {
continue;
} else if (attr.getNodeName().startsWith("xsl")) {
continue;
}
}
element.prepareAttribute(context, (Attr) attr);
}
compileNode(context, content_sub, node);
} else if (node.getNodeType() == Node.COMMENT_NODE) {
//UNDERSTAND: constructer = new CommentConstructor((XQueryContext) context, node.getNodeName());
} else if (node.getNodeType() == Node.TEXT_NODE) {
if (content instanceof XSLPathExpr) {
XSLPathExpr xslExpr = (XSLPathExpr) content;
xslExpr.addText(node.getNodeValue());
} else
constructer = new Text((XSLContext) context, node.getNodeValue());
} else if (node.getNodeType() == Node.CDATA_SECTION_NODE) {
//UNDERSTAND: constructer = new CDATAConstructor((XQueryContext) context, node.getNodeName());
} else if (node.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE) {