Java Code Examples for org.hl7.fhir.utilities.xhtml.XhtmlNode#getNsDecl()

The following examples show how to use org.hl7.fhir.utilities.xhtml.XhtmlNode#getNsDecl() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XmlParserBase.java    From org.hl7.fhir.core with Apache License 2.0 6 votes vote down vote up
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);
	}
}
 
Example 2
Source File: XmlParserBase.java    From org.hl7.fhir.core with Apache License 2.0 6 votes vote down vote up
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);
	}
}
 
Example 3
Source File: XmlParserBase.java    From org.hl7.fhir.core with Apache License 2.0 6 votes vote down vote up
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);
	}
}
 
Example 4
Source File: XmlParserBase.java    From org.hl7.fhir.core with Apache License 2.0 6 votes vote down vote up
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(true, 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);
	}
}