public XhtmlNode parseHtmlNode(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { XhtmlNode res = parseNode(xpp); if (res.getNsDecl() == null) res.getAttributes().put("xmlns", XHTML_NS); return res; } private XhtmlNode parseNode(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError {
public XhtmlNode parseHtmlNode(Element node, String defaultNS) throws FHIRFormatError { XhtmlNode res = parseNode(node, defaultNS); if (res.getNsDecl() == null) res.getAttributes().put("xmlns", XHTML_NS); return res; }
private void checkInnerNS(List<ValidationMessage> errors, Element e, String path, List<XhtmlNode> list) { for (XhtmlNode node : list) { if (node.getNodeType() == NodeType.Element) { String ns = node.getNsDecl(); rule(errors, IssueType.INVALID, e.line(), e.col(), path, ns == null || FormatUtilities.XHTML_NS.equals(ns), "Wrong namespace on the XHTML ('"+ns+"')"); checkInnerNS(errors, e, path, node.getChildNodes()); } } }
private void checkInnerNS(List<ValidationMessage> errors, Element e, String path, List<XhtmlNode> list) { for (XhtmlNode node : list) { if (node.getNodeType() == NodeType.Element) { String ns = node.getNsDecl(); rule(errors, IssueType.INVALID, e.line(), e.col(), path, ns == null || FormatUtilities.XHTML_NS.equals(ns), "Wrong namespace on the XHTML ('"+ns+"')"); checkInnerNS(errors, e, path, node.getChildNodes()); } } }
private void checkInnerNS(List<ValidationMessage> errors, Element e, String path, List<XhtmlNode> list) { for (XhtmlNode node : list) { if (node.getNodeType() == NodeType.Element) { String ns = node.getNsDecl(); rule(errors, IssueType.INVALID, e.line(), e.col(), path, ns == null || FormatUtilities.XHTML_NS.equals(ns), "Wrong namespace on the XHTML ('"+ns+"')"); checkInnerNS(errors, e, path, node.getChildNodes()); } } }
protected void composeXhtml(String name, XhtmlNode html) throws IOException { if (!Utilities.noString(xhtmlMessage)) { xml.enter(XhtmlComposer.XHTML_NS, name); xml.comment(xhtmlMessage, false); xml.exit(XhtmlComposer.XHTML_NS, name); } else { XhtmlComposer comp = new XhtmlComposer(XhtmlComposer.XML, htmlPretty); // name is also found in the html and should the same // ? check that boolean oldPretty = xml.isPretty(); xml.setPretty(htmlPretty); if (html.getNodeType() != NodeType.Text && html.getNsDecl() == null) xml.namespace(XhtmlComposer.XHTML_NS, null); comp.compose(xml, html); xml.setPretty(oldPretty); } }
if (xhtml != null) { // if it is null, this is an error already noted in the parsers String ns = xhtml.getNsDecl(); rule(errors, IssueType.INVALID, e.line(), e.col(), path, FormatUtilities.XHTML_NS.equals(ns), "Wrong namespace on the XHTML ('"+ns+"')");
if (xhtml != null) { // if it is null, this is an error already noted in the parsers String ns = xhtml.getNsDecl(); rule(errors, IssueType.INVALID, e.line(), e.col(), path, FormatUtilities.XHTML_NS.equals(ns), "Wrong namespace on the XHTML ('"+ns+"')");
if (xhtml != null) { // if it is null, this is an error already noted in the parsers String ns = xhtml.getNsDecl(); rule(errors, IssueType.INVALID, e.line(), e.col(), path, FormatUtilities.XHTML_NS.equals(ns), "Wrong namespace on the XHTML ('"+ns+"')");
public XhtmlNode parseHtmlNode(Element node, String defaultNS) throws FHIRFormatError { XhtmlNode res = parseNode(node, defaultNS); if (res.getNsDecl() == null) res.getAttributes().put("xmlns", XHTML_NS); return res; }
public XhtmlNode parseHtmlNode(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError { XhtmlNode res = parseNode(xpp); if (res.getNsDecl() == null) res.getAttributes().put("xmlns", XHTML_NS); return res; } private XhtmlNode parseNode(XmlPullParser xpp) throws XmlPullParserException, IOException, FHIRFormatError {
private void checkInnerNS(List<ValidationMessage> errors, Element e, String path, List<XhtmlNode> list) { for (XhtmlNode node : list) { if (node.getNodeType() == NodeType.Element) { String ns = node.getNsDecl(); rule(errors, IssueType.INVALID, e.line(), e.col(), path, ns == null || FormatUtilities.XHTML_NS.equals(ns), "Wrong namespace on the XHTML ('"+ns+"')"); checkInnerNS(errors, e, path, node.getChildNodes()); } } }
private void checkInnerNS(List<ValidationMessage> errors, Element e, String path, List<XhtmlNode> list) { for (XhtmlNode node : list) { if (node.getNodeType() == NodeType.Element) { String ns = node.getNsDecl(); rule(errors, IssueType.INVALID, e.line(), e.col(), path, ns == null || FormatUtilities.XHTML_NS.equals(ns), "Wrong namespace on the XHTML ('"+ns+"')"); checkInnerNS(errors, e, path, node.getChildNodes()); } } }
private void checkInnerNS(List<ValidationMessage> errors, Element e, String path, List<XhtmlNode> list) { for (XhtmlNode node : list) { if (node.getNodeType() == NodeType.Element) { String ns = node.getNsDecl(); rule(errors, IssueType.INVALID, e.line(), e.col(), path, ns == null || FormatUtilities.XHTML_NS.equals(ns), "Wrong namespace on the XHTML ('"+ns+"')"); checkInnerNS(errors, e, path, node.getChildNodes()); } } }
protected void composeXhtml(String name, XhtmlNode html) throws IOException { if (!Utilities.noString(xhtmlMessage)) { xml.enter(XhtmlComposer.XHTML_NS, name); xml.comment(xhtmlMessage, false); xml.exit(XhtmlComposer.XHTML_NS, name); } else { XhtmlComposer comp = new XhtmlComposer(XhtmlComposer.XML, htmlPretty); // name is also found in the html and should the same // ? check that boolean oldPretty = xml.isPretty(); xml.setPretty(htmlPretty); if (html.getNodeType() != NodeType.Text && html.getNsDecl() == null) xml.namespace(XhtmlComposer.XHTML_NS, null); comp.compose(xml, html); xml.setPretty(oldPretty); } }
protected void composeXhtml(String name, XhtmlNode html) throws IOException { if (!Utilities.noString(xhtmlMessage)) { xml.enter(XhtmlComposer.XHTML_NS, name); xml.comment(xhtmlMessage, false); xml.exit(XhtmlComposer.XHTML_NS, name); } else { XhtmlComposer comp = new XhtmlComposer(XhtmlComposer.XML, htmlPretty); // name is also found in the html and should the same // ? check that boolean oldPretty = xml.isPretty(); xml.setPretty(htmlPretty); if (html.getNodeType() != NodeType.Text && html.getNsDecl() == null) xml.namespace(XhtmlComposer.XHTML_NS, null); comp.compose(xml, html); xml.setPretty(oldPretty); } }
if (xhtml != null) { // if it is null, this is an error already noted in the parsers String ns = xhtml.getNsDecl(); rule(errors, IssueType.INVALID, e.line(), e.col(), path, FormatUtilities.XHTML_NS.equals(ns), "Wrong namespace on the XHTML ('"+ns+"')");
if (xhtml != null) { // if it is null, this is an error already noted in the parsers String ns = xhtml.getNsDecl(); rule(errors, IssueType.INVALID, e.line(), e.col(), path, FormatUtilities.XHTML_NS.equals(ns), "Wrong namespace on the XHTML ('"+ns+"')");
if (xhtml != null) { // if it is null, this is an error already noted in the parsers String ns = xhtml.getNsDecl(); rule(errors, IssueType.INVALID, e.line(), e.col(), path, FormatUtilities.XHTML_NS.equals(ns), "Wrong namespace on the XHTML ('"+ns+"')");