org.w3c.dom.Notation.getSystemId()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(9.2k)|赞(0)|评价(0)|浏览(124)

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

Notation.getSystemId介绍

[英]The system identifier of this notation. If the system identifier was not specified, this is null. This may be an absolute URI or not.
[中]

代码示例

代码示例来源:origin: net.open-esb.core/manage

/**
 * Present a Notation as a String.
 * @param notation a Notation Node.
 * @return the String representation of the Notation.
 */
private String notationToString(Notation notation)
{
  StringBuffer sb = new StringBuffer();
  sb.append("<!NOTATION " + notation.getNodeName());
  String pubID = notation.getPublicId();
  String sysID = notation.getSystemId();
  if ( pubID != null )
  {
    sb.append(" PUBLIC " + pubID);
    if ( sysID != null )
    {
      sb.append(" " + sysID);
    }
  }
  else if ( sysID != null )
  {
    sb.append(" SYSTEM " + sysID);
  }
  sb.append("\n");
  return sb.toString();
}

代码示例来源:origin: com.helger/ph-isorelax

public boolean enter (final Notation notation)
{
 final String name = notation.getNodeName ();
 final String pid = notation.getPublicId ();
 final String sid = notation.getSystemId ();
 buffer_.append ("<!NOTATION ").append (name);
 if (pid != null)
 {
  buffer_.append (" PUBLIC \"").append (pid).append ("\"");
  if (sid != null)
  {
   buffer_.append (" \"").append (UXML.escapeSystemQuot (sid)).append ("\"");
  }
 }
 else
  if (sid != null)
  {
   buffer_.append (" SYSTEM \"").append (UXML.escapeSystemQuot (sid)).append ("\"");
  }
 buffer_.append (">");
 return (true);
}

代码示例来源:origin: org.wicketstuff.htmlvalidator/wicketstuff-isorelax

public boolean enter(Notation notation) {
String name = notation.getNodeName();
String pid = notation.getPublicId();
String sid = notation.getSystemId();
buffer_.append("<!NOTATION ");
buffer_.append(name);
if (pid != null) {
  buffer_.append(" PUBLIC \"");
  buffer_.append(pid);
  buffer_.append("\"");
  if (sid != null) {
  buffer_.append(" \"");
  buffer_.append(UXML.escapeSystemQuot(sid));
  buffer_.append("\"");
  }
} else if (sid != null) {
  buffer_.append(" SYSTEM \"");
  buffer_.append(UXML.escapeSystemQuot(sid));
  buffer_.append("\"");
}
buffer_.append(">");
return (true);
}

代码示例来源:origin: com.sun.xml.bind/jaxb-extra-osgi

public boolean enter(Notation notation) {
  String s = notation.getNodeName();
  String s1 = notation.getPublicId();
  String s2 = notation.getSystemId();
  buffer_.append("<!NOTATION ");
  buffer_.append(s);
  if(s1 != null) {
    buffer_.append(" PUBLIC \"");
    buffer_.append(s1);
    buffer_.append("\"");
    if(s2 != null) {
      buffer_.append(" \"");
      buffer_.append(UXML.escapeSystemQuot(s2));
      buffer_.append("\"");
    }
  } else
  if(s2 != null) {
    buffer_.append(" SYSTEM \"");
    buffer_.append(UXML.escapeSystemQuot(s2));
    buffer_.append("\"");
  }
  buffer_.append(">");
  return true;
}

代码示例来源:origin: com.phloc/isorelax

public boolean enter (final Notation notation)
{
 final String name = notation.getNodeName ();
 final String pid = notation.getPublicId ();
 final String sid = notation.getSystemId ();
 buffer_.append ("<!NOTATION ");
 buffer_.append (name);
 if (pid != null)
 {
  buffer_.append (" PUBLIC \"");
  buffer_.append (pid);
  buffer_.append ("\"");
  if (sid != null)
  {
   buffer_.append (" \"");
   buffer_.append (UXML.escapeSystemQuot (sid));
   buffer_.append ("\"");
  }
 }
 else
  if (sid != null)
  {
   buffer_.append (" SYSTEM \"");
   buffer_.append (UXML.escapeSystemQuot (sid));
   buffer_.append ("\"");
  }
 buffer_.append (">");
 return (true);
}

代码示例来源:origin: org.apache.ws.commons.axiom/dom-testsuite

publicId1Imp = notation1.getPublicId();
publicId1NewImp = notation1.getPublicId();
systemId1Imp = notation1.getSystemId();
systemId1NewImp = notation1.getSystemId();
publicId2Imp = notation2.getPublicId();
publicId2NewImp = notation2.getPublicId();
systemId2 = notation2.getSystemId();
systemId2Imp = notation2.getSystemId();
systemId2NewImp = notation2.getSystemId();
assertEquals("documentimportnode22_N1PID", publicId1, publicId1Imp);
assertEquals("documentimportnode22_N1NPID", publicId1, publicId1NewImp);

代码示例来源:origin: org.apache.ws.commons.axiom/dom-testsuite

/**
* Runs the test case.
* @throws Throwable Any uncaught exception causes test to fail
*/
public void runTest() throws Throwable {
 Document doc;
 DocumentType docType;
 NamedNodeMap notations;
 Notation notationNode;
 String systemId;
 doc = (Document) load("staff", false);
 docType = doc.getDoctype();
 assertNotNull("docTypeNotNull", docType);
 notations = docType.getNotations();
 assertNotNull("notationsNotNull", notations);
 notationNode = (Notation) notations.getNamedItem("notation1");
 systemId = notationNode.getSystemId();
 assertNull("systemId", systemId);
 }
/**

代码示例来源:origin: org.apache.ws.commons.axiom/dom-testsuite

/**
  * Runs the test case.
  * @throws Throwable Any uncaught exception causes test to fail
  */
  public void runTest() throws Throwable {
   Document doc;
   DocumentType docType;
   NamedNodeMap notations;
   Notation notationNode;
   String systemId;
   int index;
   doc = (Document) load("staff", false);
   docType = doc.getDoctype();
   assertNotNull("docTypeNotNull", docType);
   notations = docType.getNotations();
   assertNotNull("notationsNotNull", notations);
   notationNode = (Notation) notations.getNamedItem("notation2");
   systemId = notationNode.getSystemId();
   assertURIEquals("uriEquals", null, null, null, "notation2File", null, null, null, null, systemId);
}
  /**

代码示例来源:origin: com.sun.xml.bind/jaxb-extra-osgi

private void _handleEntities(DocumentType documenttype) {
  try {
    NamedNodeMap namednodemap = documenttype.getEntities();
    int i = namednodemap.getLength();
    for(int j = 0; j < i; j++) {
      Entity entity = (Entity)namednodemap.item(j);
      String s = entity.getPublicId();
      String s1 = entity.getSystemId();
      String s2 = entity.getNotationName();
      if(s != null || s1 != null)
        _handleExternalEntity(entity.getNodeName(), s, s1, s2);
      else
        _handleInternalEntity(entity);
    }
    NamedNodeMap namednodemap1 = documenttype.getNotations();
    int k = namednodemap1.getLength();
    for(int l = 0; l < k; l++) {
      Notation notation = (Notation)namednodemap1.item(l);
      String s3 = notation.getPublicId();
      String s4 = notation.getSystemId();
      dtd_.notationDecl(notation.getNodeName(), s3, s4);
    }
  }
  catch(SAXException saxexception) {
    _errorReport(saxexception);
  }
}

代码示例来源:origin: org.wicketstuff.htmlvalidator/wicketstuff-isorelax

Notation notation = (Notation) notations.item(i);
String publicID = notation.getPublicId();
String systemID = notation.getSystemId();
dtd_.notationDecl(notation.getNodeName(), publicID, systemID);

代码示例来源:origin: com.sun.xml.bind/jaxb-extra-osgi

private void _handleEntities(DocumentType documenttype) {
  try {
    NamedNodeMap namednodemap = documenttype.getEntities();
    int i = namednodemap.getLength();
    for(int j = 0; j < i; j++) {
      Entity entity = (Entity)namednodemap.item(j);
      String s = entity.getPublicId();
      String s1 = entity.getSystemId();
      String s2 = entity.getNotationName();
      if(s != null || s1 != null)
        _handleExternalEntity(entity.getNodeName(), s, s1, s2);
      else
        _handleInternalEntity(entity);
    }
    NamedNodeMap namednodemap1 = documenttype.getNotations();
    int k = namednodemap1.getLength();
    for(int l = 0; l < k; l++) {
      Notation notation = (Notation)namednodemap1.item(l);
      String s3 = notation.getPublicId();
      String s4 = notation.getSystemId();
      dtd_.notationDecl(notation.getNodeName(), s3, s4);
    }
  }
  catch(SAXException saxexception) {
    _errorReport(saxexception);
  }
}

代码示例来源:origin: com.phloc/isorelax

final String systemID = notation.getSystemId ();
dtd_.notationDecl (notation.getNodeName (), publicID, systemID);

代码示例来源:origin: org.wicketstuff.htmlvalidator/wicketstuff-isorelax

Notation notation = (Notation)notations.item(i);
String publicID = notation.getPublicId();
String systemID = notation.getSystemId();
dtd_.notationDecl(notation.getNodeName(), publicID, systemID);

代码示例来源:origin: com.helger/ph-isorelax

final String systemID = notation.getSystemId ();
dtd_.notationDecl (notation.getNodeName (), publicID, systemID);

代码示例来源:origin: com.helger/ph-isorelax

final String systemID = notation.getSystemId ();
dtd_.notationDecl (notation.getNodeName (), publicID, systemID);

代码示例来源:origin: com.phloc/isorelax

final String systemID = notation.getSystemId ();
dtd_.notationDecl (notation.getNodeName (), publicID, systemID);

代码示例来源:origin: org.apache.ws.commons.axiom/dom-testsuite

publicVal = aNode.getPublicId();
   assertEquals("publicId", "notation1File", publicVal);
   system = aNode.getSystemId();
   assertNull("notationSystemId", system);

代码示例来源:origin: com.sun.xml.parsers/jaxp-ri

NotationImpl newNotation = (NotationImpl) fDocumentImpl.createNotation(oldNotation.getNodeName());
newNotation.setPublicId(oldNotation.getPublicId());
newNotation.setSystemId(oldNotation.getSystemId());
newMap.setNamedItem(newNotation);

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxp-ri

NotationImpl newNotation = (NotationImpl) fDocumentImpl.createNotation(oldNotation.getNodeName());
newNotation.setPublicId(oldNotation.getPublicId());
newNotation.setSystemId(oldNotation.getSystemId());
newMap.setNamedItem(newNotation);

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

NotationImpl newNotation = (NotationImpl) fDocumentImpl.createNotation(oldNotation.getNodeName());
newNotation.setPublicId(oldNotation.getPublicId());
newNotation.setSystemId(oldNotation.getSystemId());
newMap.setNamedItem(newNotation);

相关文章