gpt4 book ai didi

org.hl7.fhir.utilities.xhtml.XhtmlNode.getNsDecl()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 07:41:05 32 4
gpt4 key购买 nike

本文整理了Java中org.hl7.fhir.utilities.xhtml.XhtmlNode.getNsDecl()方法的一些代码示例,展示了XhtmlNode.getNsDecl()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XhtmlNode.getNsDecl()方法的具体详情如下:
包路径:org.hl7.fhir.utilities.xhtml.XhtmlNode
类名称:XhtmlNode
方法名:getNsDecl

XhtmlNode.getNsDecl介绍

暂无

代码示例

代码示例来源:origin: jamesagnew/hapi-fhir

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  {

代码示例来源:origin: jamesagnew/hapi-fhir

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;
}

代码示例来源:origin: jamesagnew/hapi-fhir

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());
  }
 }    
}

代码示例来源:origin: jamesagnew/hapi-fhir

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());
    }
  }    
}

代码示例来源:origin: jamesagnew/hapi-fhir

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());
  }
 }
}

代码示例来源:origin: jamesagnew/hapi-fhir

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);
  }
}

代码示例来源:origin: jamesagnew/hapi-fhir

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+"')");

代码示例来源:origin: jamesagnew/hapi-fhir

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+"')");

代码示例来源:origin: jamesagnew/hapi-fhir

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+"')");

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-utilities

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;
}

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-utilities

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  {

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu2.1

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());
    }
  }    
}

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-validation

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());
  }
 }
}

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-validation

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());
  }
 }    
}

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-structures-r4

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);
  }
}

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

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);
  }
}

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu2.1

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+"')");

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-validation

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+"')");

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-validation

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+"')");

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com