org.apache.xml.serializer.utils.XML11Char.isXML11ValidNCName()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(8.0k)|赞(0)|评价(0)|浏览(211)

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

XML11Char.isXML11ValidNCName介绍

[英]Check to see if a string is a valid NCName according to [4] from the XML Namespaces 1.1 Recommendation
[中]根据XML名称空间1.1建议中的[4],检查字符串是否为有效的NCName

代码示例

代码示例来源:origin: robovm/robovm

  1. /**
  2. * Taken from org.apache.xerces.dom.CoreDocumentImpl
  3. *
  4. * Checks if the given qualified name is legal with respect
  5. * to the version of XML to which this document must conform.
  6. *
  7. * @param prefix prefix of qualified name
  8. * @param local local part of qualified name
  9. */
  10. protected boolean isValidQName(
  11. String prefix,
  12. String local,
  13. boolean xml11Version) {
  14. // check that both prefix and local part match NCName
  15. if (local == null)
  16. return false;
  17. boolean validNCName = false;
  18. if (!xml11Version) {
  19. validNCName =
  20. (prefix == null || XMLChar.isValidNCName(prefix))
  21. && XMLChar.isValidNCName(local);
  22. } else {
  23. validNCName =
  24. (prefix == null || XML11Char.isXML11ValidNCName(prefix))
  25. && XML11Char.isXML11ValidNCName(local);
  26. }
  27. return validNCName;
  28. }

代码示例来源:origin: ibinti/bugvm

  1. /**
  2. * Taken from org.apache.xerces.dom.CoreDocumentImpl
  3. *
  4. * Checks if the given qualified name is legal with respect
  5. * to the version of XML to which this document must conform.
  6. *
  7. * @param prefix prefix of qualified name
  8. * @param local local part of qualified name
  9. */
  10. protected boolean isValidQName(
  11. String prefix,
  12. String local,
  13. boolean xml11Version) {
  14. // check that both prefix and local part match NCName
  15. if (local == null)
  16. return false;
  17. boolean validNCName = false;
  18. if (!xml11Version) {
  19. validNCName =
  20. (prefix == null || XMLChar.isValidNCName(prefix))
  21. && XMLChar.isValidNCName(local);
  22. } else {
  23. validNCName =
  24. (prefix == null || XML11Char.isXML11ValidNCName(prefix))
  25. && XML11Char.isXML11ValidNCName(local);
  26. }
  27. return validNCName;
  28. }

代码示例来源:origin: MobiVM/robovm

  1. /**
  2. * Taken from org.apache.xerces.dom.CoreDocumentImpl
  3. *
  4. * Checks if the given qualified name is legal with respect
  5. * to the version of XML to which this document must conform.
  6. *
  7. * @param prefix prefix of qualified name
  8. * @param local local part of qualified name
  9. */
  10. protected boolean isValidQName(
  11. String prefix,
  12. String local,
  13. boolean xml11Version) {
  14. // check that both prefix and local part match NCName
  15. if (local == null)
  16. return false;
  17. boolean validNCName = false;
  18. if (!xml11Version) {
  19. validNCName =
  20. (prefix == null || XMLChar.isValidNCName(prefix))
  21. && XMLChar.isValidNCName(local);
  22. } else {
  23. validNCName =
  24. (prefix == null || XML11Char.isXML11ValidNCName(prefix))
  25. && XML11Char.isXML11ValidNCName(local);
  26. }
  27. return validNCName;
  28. }

代码示例来源:origin: xalan/serializer

  1. /**
  2. * Taken from org.apache.xerces.dom.CoreDocumentImpl
  3. *
  4. * Checks if the given qualified name is legal with respect
  5. * to the version of XML to which this document must conform.
  6. *
  7. * @param prefix prefix of qualified name
  8. * @param local local part of qualified name
  9. */
  10. protected boolean isValidQName(
  11. String prefix,
  12. String local,
  13. boolean xml11Version) {
  14. // check that both prefix and local part match NCName
  15. if (local == null)
  16. return false;
  17. boolean validNCName = false;
  18. if (!xml11Version) {
  19. validNCName =
  20. (prefix == null || XMLChar.isValidNCName(prefix))
  21. && XMLChar.isValidNCName(local);
  22. } else {
  23. validNCName =
  24. (prefix == null || XML11Char.isXML11ValidNCName(prefix))
  25. && XML11Char.isXML11ValidNCName(local);
  26. }
  27. return validNCName;
  28. }

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

  1. /**
  2. * Taken from org.apache.xerces.dom.CoreDocumentImpl
  3. *
  4. * Checks if the given qualified name is legal with respect
  5. * to the version of XML to which this document must conform.
  6. *
  7. * @param prefix prefix of qualified name
  8. * @param local local part of qualified name
  9. */
  10. protected boolean isValidQName(
  11. String prefix,
  12. String local,
  13. boolean xml11Version) {
  14. // check that both prefix and local part match NCName
  15. if (local == null)
  16. return false;
  17. boolean validNCName = false;
  18. if (!xml11Version) {
  19. validNCName =
  20. (prefix == null || XMLChar.isValidNCName(prefix))
  21. && XMLChar.isValidNCName(local);
  22. } else {
  23. validNCName =
  24. (prefix == null || XML11Char.isXML11ValidNCName(prefix))
  25. && XML11Char.isXML11ValidNCName(local);
  26. }
  27. return validNCName;
  28. }

代码示例来源:origin: org.apache.xalan/com.springsource.org.apache.xml.serializer

  1. /**
  2. * Taken from org.apache.xerces.dom.CoreDocumentImpl
  3. *
  4. * Checks if the given qualified name is legal with respect
  5. * to the version of XML to which this document must conform.
  6. *
  7. * @param prefix prefix of qualified name
  8. * @param local local part of qualified name
  9. */
  10. protected boolean isValidQName(
  11. String prefix,
  12. String local,
  13. boolean xml11Version) {
  14. // check that both prefix and local part match NCName
  15. if (local == null)
  16. return false;
  17. boolean validNCName = false;
  18. if (!xml11Version) {
  19. validNCName =
  20. (prefix == null || XMLChar.isValidNCName(prefix))
  21. && XMLChar.isValidNCName(local);
  22. } else {
  23. validNCName =
  24. (prefix == null || XML11Char.isXML11ValidNCName(prefix))
  25. && XML11Char.isXML11ValidNCName(local);
  26. }
  27. return validNCName;
  28. }

代码示例来源:origin: com.bugvm/bugvm-rt

  1. /**
  2. * Taken from org.apache.xerces.dom.CoreDocumentImpl
  3. *
  4. * Checks if the given qualified name is legal with respect
  5. * to the version of XML to which this document must conform.
  6. *
  7. * @param prefix prefix of qualified name
  8. * @param local local part of qualified name
  9. */
  10. protected boolean isValidQName(
  11. String prefix,
  12. String local,
  13. boolean xml11Version) {
  14. // check that both prefix and local part match NCName
  15. if (local == null)
  16. return false;
  17. boolean validNCName = false;
  18. if (!xml11Version) {
  19. validNCName =
  20. (prefix == null || XMLChar.isValidNCName(prefix))
  21. && XMLChar.isValidNCName(local);
  22. } else {
  23. validNCName =
  24. (prefix == null || XML11Char.isXML11ValidNCName(prefix))
  25. && XML11Char.isXML11ValidNCName(local);
  26. }
  27. return validNCName;
  28. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xalan

  1. /**
  2. * Taken from org.apache.xerces.dom.CoreDocumentImpl
  3. *
  4. * Checks if the given qualified name is legal with respect
  5. * to the version of XML to which this document must conform.
  6. *
  7. * @param prefix prefix of qualified name
  8. * @param local local part of qualified name
  9. */
  10. protected boolean isValidQName(
  11. String prefix,
  12. String local,
  13. boolean xml11Version) {
  14. // check that both prefix and local part match NCName
  15. if (local == null)
  16. return false;
  17. boolean validNCName = false;
  18. if (!xml11Version) {
  19. validNCName =
  20. (prefix == null || XMLChar.isValidNCName(prefix))
  21. && XMLChar.isValidNCName(local);
  22. } else {
  23. validNCName =
  24. (prefix == null || XML11Char.isXML11ValidNCName(prefix))
  25. && XML11Char.isXML11ValidNCName(local);
  26. }
  27. return validNCName;
  28. }

代码示例来源:origin: com.gluonhq/robovm-rt

  1. /**
  2. * Taken from org.apache.xerces.dom.CoreDocumentImpl
  3. *
  4. * Checks if the given qualified name is legal with respect
  5. * to the version of XML to which this document must conform.
  6. *
  7. * @param prefix prefix of qualified name
  8. * @param local local part of qualified name
  9. */
  10. protected boolean isValidQName(
  11. String prefix,
  12. String local,
  13. boolean xml11Version) {
  14. // check that both prefix and local part match NCName
  15. if (local == null)
  16. return false;
  17. boolean validNCName = false;
  18. if (!xml11Version) {
  19. validNCName =
  20. (prefix == null || XMLChar.isValidNCName(prefix))
  21. && XMLChar.isValidNCName(local);
  22. } else {
  23. validNCName =
  24. (prefix == null || XML11Char.isXML11ValidNCName(prefix))
  25. && XML11Char.isXML11ValidNCName(local);
  26. }
  27. return validNCName;
  28. }

代码示例来源:origin: org.apache.karaf.bundles/org.apache.karaf.bundles.xalan-2.7.1

  1. /**
  2. * Taken from org.apache.xerces.dom.CoreDocumentImpl
  3. *
  4. * Checks if the given qualified name is legal with respect
  5. * to the version of XML to which this document must conform.
  6. *
  7. * @param prefix prefix of qualified name
  8. * @param local local part of qualified name
  9. */
  10. protected boolean isValidQName(
  11. String prefix,
  12. String local,
  13. boolean xml11Version) {
  14. // check that both prefix and local part match NCName
  15. if (local == null)
  16. return false;
  17. boolean validNCName = false;
  18. if (!xml11Version) {
  19. validNCName =
  20. (prefix == null || XMLChar.isValidNCName(prefix))
  21. && XMLChar.isValidNCName(local);
  22. } else {
  23. validNCName =
  24. (prefix == null || XML11Char.isXML11ValidNCName(prefix))
  25. && XML11Char.isXML11ValidNCName(local);
  26. }
  27. return validNCName;
  28. }

代码示例来源:origin: FlexoVM/flexovm

  1. /**
  2. * Taken from org.apache.xerces.dom.CoreDocumentImpl
  3. *
  4. * Checks if the given qualified name is legal with respect
  5. * to the version of XML to which this document must conform.
  6. *
  7. * @param prefix prefix of qualified name
  8. * @param local local part of qualified name
  9. */
  10. protected boolean isValidQName(
  11. String prefix,
  12. String local,
  13. boolean xml11Version) {
  14. // check that both prefix and local part match NCName
  15. if (local == null)
  16. return false;
  17. boolean validNCName = false;
  18. if (!xml11Version) {
  19. validNCName =
  20. (prefix == null || XMLChar.isValidNCName(prefix))
  21. && XMLChar.isValidNCName(local);
  22. } else {
  23. validNCName =
  24. (prefix == null || XML11Char.isXML11ValidNCName(prefix))
  25. && XML11Char.isXML11ValidNCName(local);
  26. }
  27. return validNCName;
  28. }

相关文章