本文整理了Java中org.w3c.dom.Notation.getPublicId()
方法的一些代码示例,展示了Notation.getPublicId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Notation.getPublicId()
方法的具体详情如下:
包路径:org.w3c.dom.Notation
类名称:Notation
方法名:getPublicId
[英]The public identifier of this notation. If the public identifier was not specified, this is null
.
[中]此符号的公共标识符。如果未指定公共标识符,则为[$0$]。
代码示例来源: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
notationImpNew1 = (Notation) docImp.importNode(notation1, false);
notationImpNew2 = (Notation) docImp.importNode(notation2, true);
publicId1 = notation1.getPublicId();
publicId1Imp = notation1.getPublicId();
publicId1NewImp = notation1.getPublicId();
systemId1Imp = notation1.getSystemId();
systemId1NewImp = notation1.getSystemId();
publicId2Imp = notation2.getPublicId();
publicId2NewImp = notation2.getPublicId();
systemId2 = notation2.getSystemId();
systemId2Imp = notation2.getSystemId();
代码示例来源: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 publicId;
doc = (Document) load("staff", false);
docType = doc.getDoctype();
assertNotNull("docTypeNotNull", docType);
notations = docType.getNotations();
assertNotNull("notationsNotNull", notations);
notationNode = (Notation) notations.getNamedItem("notation1");
publicId = notationNode.getPublicId();
assertEquals("publicId", "notation1File", publicId);
}
/**
代码示例来源: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 publicId;
doc = (Document) load("staff", false);
docType = doc.getDoctype();
assertNotNull("docTypeNotNull", docType);
notations = docType.getNotations();
assertNotNull("notationsNotNull", notations);
notationNode = (Notation) notations.getNamedItem("notation2");
publicId = notationNode.getPublicId();
assertNull("publicId", publicId);
}
/**
代码示例来源: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
for (int i = 0; i < nNotations; i++) {
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 publicID = notation.getPublicId ();
final String systemID = notation.getSystemId ();
dtd_.notationDecl (notation.getNodeName (), publicID, systemID);
代码示例来源:origin: org.wicketstuff.htmlvalidator/wicketstuff-isorelax
for (int i = 0;i < nNotations;i++) {
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 publicID = notation.getPublicId ();
final String systemID = notation.getSystemId ();
dtd_.notationDecl (notation.getNodeName (), publicID, systemID);
代码示例来源:origin: com.helger/ph-isorelax
final String publicID = notation.getPublicId ();
final String systemID = notation.getSystemId ();
dtd_.notationDecl (notation.getNodeName (), publicID, systemID);
代码示例来源:origin: com.phloc/isorelax
final String publicID = notation.getPublicId ();
final String systemID = notation.getSystemId ();
dtd_.notationDecl (notation.getNodeName (), publicID, systemID);
代码示例来源:origin: org.apache.ws.commons.axiom/dom-testsuite
system = docType.getSystemId();
assertURIEquals("systemId", null, null, null, "staffNS.dtd", null, null, null, null, system);
publicVal = aNode.getPublicId();
assertEquals("publicId", "notation1File", publicVal);
system = aNode.getSystemId();
代码示例来源:origin: com.sun.xml.parsers/jaxp-ri
Notation oldNotation = (Notation) oldMap.item(i);
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
Notation oldNotation = (Notation) oldMap.item(i);
NotationImpl newNotation = (NotationImpl) fDocumentImpl.createNotation(oldNotation.getNodeName());
newNotation.setPublicId(oldNotation.getPublicId());
newNotation.setSystemId(oldNotation.getSystemId());
newMap.setNamedItem(newNotation);
代码示例来源:origin: com.rackspace.apache/xerces2-xsd11
Notation oldNotation = (Notation) oldMap.item(i);
NotationImpl newNotation = (NotationImpl) fDocumentImpl.createNotation(oldNotation.getNodeName());
newNotation.setPublicId(oldNotation.getPublicId());
newNotation.setSystemId(oldNotation.getSystemId());
newMap.setNamedItem(newNotation);
内容来源于网络,如有侵权,请联系作者删除!