rho-tau-extensions 6.0.0 → 7.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (296) hide show
  1. checksums.yaml +4 -4
  2. data/libs/android_net_native_prebuilt/ext/build +22 -0
  3. data/libs/android_net_native_prebuilt/ext/build.bat +44 -0
  4. data/libs/android_net_native_prebuilt/ext/platform/android/android_net_native.jar +0 -0
  5. data/libs/android_net_native_prebuilt/ext/platform/android/lib/aarch64/libandroid_net_native.a +0 -0
  6. data/libs/android_net_native_prebuilt/ext/platform/android/lib/armeabi/libandroid_net_native.a +0 -0
  7. data/libs/android_net_native_prebuilt/ext/platform/android/lib/x86/libandroid_net_native.a +0 -0
  8. data/libs/android_net_native_prebuilt/ext.yml +8 -0
  9. data/libs/crosswalk/ext/platform/android/Rakefile +19 -1
  10. data/libs/crosswalk/ext/platform/android/adds/lib/armeabi/libxwalkcore.so +0 -0
  11. data/libs/crosswalk/ext/platform/android/adds/lib/armeabi/libxwalkdummy.so +0 -0
  12. data/libs/crosswalk/ext/platform/android/adds/lib/armeabi/native_lib_placeholder.stamp +0 -0
  13. data/libs/crosswalk/ext/platform/android/adds/lib/x86/libxwalkcore.so +0 -0
  14. data/libs/crosswalk/ext/platform/android/adds/lib/x86/libxwalkdummy.so +0 -0
  15. data/libs/crosswalk/ext/platform/android/adds/lib/x86/native_lib_placeholder.stamp +0 -0
  16. data/libs/crosswalk/ext/platform/android/adds/lib/xwalk_core_library_java.jar +0 -0
  17. data/libs/crosswalk/ext/platform/android/adds/res/layout/dropdown_item.xml +1 -1
  18. data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/dropdown_item.xml +2 -2
  19. data/libs/crosswalk/ext/platform/android/adds/res/menu/select_action_menu.xml +8 -8
  20. data/libs/crosswalk/ext/platform/android/adds/res/raw/icudtl.dat +0 -0
  21. data/libs/crosswalk/ext/platform/android/adds/res/raw/xwalk.pak +0 -0
  22. data/libs/crosswalk/ext/platform/android/adds/res/raw/xwalk_100_percent.pak +0 -0
  23. data/libs/crosswalk/ext/platform/android/adds/res/values/android_ui_strings.xml +1 -0
  24. data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_attrs.xml → attrs.xml} +0 -0
  25. data/libs/crosswalk/ext/platform/android/adds/res/values/attrs_03.xml +18 -0
  26. data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_colors.xml → colors_xwalk.xml} +0 -0
  27. data/libs/crosswalk/ext/platform/android/adds/res/values/{ui_java_dimens.xml → dimens_03.xml} +1 -3
  28. data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_dimens.xml → dimens_xwalk.xml} +0 -0
  29. data/libs/crosswalk/ext/platform/android/adds/res/values/ids_xwalk.xml +12 -0
  30. data/libs/crosswalk/ext/platform/android/adds/res/values/strings_00.xml +16 -0
  31. data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_core_internal_java_strings.xml → strings_01.xml} +0 -0
  32. data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_core_java_strings.xml → strings_02.xml} +0 -0
  33. data/libs/crosswalk/ext/platform/android/adds/res/values/{ui_java_strings.xml → strings_03.xml} +0 -0
  34. data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_styles.xml → styles_00.xml} +0 -0
  35. data/libs/crosswalk/ext/platform/android/adds/res/values/{ui_java_styles.xml → styles_03.xml} +0 -0
  36. data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_values.xml → values_00.xml} +0 -0
  37. data/libs/crosswalk/ext/platform/android/adds/res/values/xwalk_app_strings.xml +7 -10
  38. data/libs/crosswalk/ext/platform/android/adds/res/values/xwalk_resources_list.xml +2 -1
  39. data/libs/crosswalk/ext/platform/android/adds/res/values-am/android_ui_strings.xml +1 -0
  40. data/libs/crosswalk/ext/platform/android/adds/res/values-ar/android_ui_strings.xml +1 -0
  41. data/libs/crosswalk/ext/platform/android/adds/res/values-bg/android_ui_strings.xml +1 -0
  42. data/libs/crosswalk/ext/platform/android/adds/res/values-ca/android_ui_strings.xml +1 -0
  43. data/libs/crosswalk/ext/platform/android/adds/res/values-cs/android_ui_strings.xml +1 -0
  44. data/libs/crosswalk/ext/platform/android/adds/res/values-da/android_ui_strings.xml +4 -3
  45. data/libs/crosswalk/ext/platform/android/adds/res/values-de/android_ui_strings.xml +1 -0
  46. data/libs/crosswalk/ext/platform/android/adds/res/values-el/android_ui_strings.xml +1 -0
  47. data/libs/crosswalk/ext/platform/android/adds/res/values-en-rGB/android_ui_strings.xml +1 -0
  48. data/libs/crosswalk/ext/platform/android/adds/res/values-es/android_ui_strings.xml +1 -0
  49. data/libs/crosswalk/ext/platform/android/adds/res/values-es-rUS/android_ui_strings.xml +1 -0
  50. data/libs/crosswalk/ext/platform/android/adds/res/values-fa/android_ui_strings.xml +2 -1
  51. data/libs/crosswalk/ext/platform/android/adds/res/values-fi/android_ui_strings.xml +1 -0
  52. data/libs/crosswalk/ext/platform/android/adds/res/values-fr/android_ui_strings.xml +1 -0
  53. data/libs/crosswalk/ext/platform/android/adds/res/values-hi/android_ui_strings.xml +2 -1
  54. data/libs/crosswalk/ext/platform/android/adds/res/values-hr/android_ui_strings.xml +1 -0
  55. data/libs/crosswalk/ext/platform/android/adds/res/values-hu/android_ui_strings.xml +1 -0
  56. data/libs/crosswalk/ext/platform/android/adds/res/values-in/android_ui_strings.xml +1 -0
  57. data/libs/crosswalk/ext/platform/android/adds/res/values-it/android_ui_strings.xml +1 -0
  58. data/libs/crosswalk/ext/platform/android/adds/res/values-iw/android_ui_strings.xml +1 -0
  59. data/libs/crosswalk/ext/platform/android/adds/res/values-ja/android_ui_strings.xml +1 -0
  60. data/libs/crosswalk/ext/platform/android/adds/res/values-ko/android_ui_strings.xml +1 -0
  61. data/libs/crosswalk/ext/platform/android/adds/res/values-lt/android_ui_strings.xml +1 -0
  62. data/libs/crosswalk/ext/platform/android/adds/res/values-lv/android_ui_strings.xml +1 -0
  63. data/libs/crosswalk/ext/platform/android/adds/res/values-nb/android_ui_strings.xml +1 -0
  64. data/libs/crosswalk/ext/platform/android/adds/res/values-nl/android_ui_strings.xml +1 -0
  65. data/libs/crosswalk/ext/platform/android/adds/res/values-pl/android_ui_strings.xml +1 -0
  66. data/libs/crosswalk/ext/platform/android/adds/res/values-pt-rBR/android_ui_strings.xml +1 -0
  67. data/libs/crosswalk/ext/platform/android/adds/res/values-pt-rPT/android_ui_strings.xml +1 -0
  68. data/libs/crosswalk/ext/platform/android/adds/res/values-ro/android_ui_strings.xml +1 -0
  69. data/libs/crosswalk/ext/platform/android/adds/res/values-ru/android_ui_strings.xml +1 -0
  70. data/libs/crosswalk/ext/platform/android/adds/res/values-sk/android_ui_strings.xml +1 -0
  71. data/libs/crosswalk/ext/platform/android/adds/res/values-sl/android_ui_strings.xml +1 -0
  72. data/libs/crosswalk/ext/platform/android/adds/res/values-sr/android_ui_strings.xml +1 -0
  73. data/libs/crosswalk/ext/platform/android/adds/res/values-sv/android_ui_strings.xml +1 -0
  74. data/libs/crosswalk/ext/platform/android/adds/res/values-sw/android_ui_strings.xml +2 -1
  75. data/libs/crosswalk/ext/platform/android/adds/res/values-th/android_ui_strings.xml +1 -0
  76. data/libs/crosswalk/ext/platform/android/adds/res/values-tl/android_ui_strings.xml +1 -0
  77. data/libs/crosswalk/ext/platform/android/adds/res/values-tr/android_ui_strings.xml +1 -0
  78. data/libs/crosswalk/ext/platform/android/adds/res/values-uk/android_ui_strings.xml +1 -0
  79. data/libs/crosswalk/ext/platform/android/adds/res/values-v17/{ui_java_styles.xml → styles_03.xml} +0 -0
  80. data/libs/crosswalk/ext/platform/android/adds/res/values-v21/{ui_java_styles.xml → styles_03.xml} +0 -0
  81. data/libs/crosswalk/ext/platform/android/adds/res/values-vi/android_ui_strings.xml +1 -0
  82. data/libs/crosswalk/ext/platform/android/adds/res/values-zh-rCN/android_ui_strings.xml +1 -0
  83. data/libs/crosswalk/ext/platform/android/adds/res/values-zh-rTW/android_ui_strings.xml +1 -0
  84. data/libs/crosswalk/ext/platform/android/src/com/tautechnologies/tau/crosswalk/TauXWalkWebView.java +18 -1
  85. data/libs/enterprise-barcode/ext/platform/android/adds/lib/aarch64/liballbarcode.a +0 -0
  86. data/libs/enterprise-barcode/ext/platform/android/adds/lib/armeabi/liballbarcode.a +0 -0
  87. data/libs/enterprise-barcode/ext/platform/android/adds/lib/x86/liballbarcode.a +0 -0
  88. data/libs/enterprise-barcode/ext/platform/android/allbarcode.jar +0 -0
  89. data/libs/enterprise-barcode/ext/platform/iphone/Barcode.xcodeproj/project.pbxproj +8 -4
  90. data/libs/enterprise-barcode/ext/platform/iphone/Rakefile +9 -58
  91. data/libs/fcm-push-18/ext/android/AndroidManifest.rb +10 -0
  92. data/libs/fcm-push-18/ext/android/ApplicationManifestAdds.erb +39 -0
  93. data/libs/fcm-push-18/ext/android/Rakefile +187 -0
  94. data/libs/fcm-push-18/ext/android/ext_java.files +3 -0
  95. data/libs/fcm-push-18/ext/android/ext_native.files +1 -0
  96. data/libs/fcm-push-18/ext/android/jni/src/fcmpushclient.cpp +215 -0
  97. data/libs/fcm-push-18/ext/android/jni/src/fcmpushclient.h +74 -0
  98. data/libs/fcm-push-18/ext/android/res/res/values/fireBaseValues.xml +5 -0
  99. data/libs/fcm-push-18/ext/android/src/com/rhomobile/rhodes/fcm/FCMFacade.java +164 -0
  100. data/libs/fcm-push-18/ext/android/src/com/rhomobile/rhodes/fcm/FCMIntentService.java +219 -0
  101. data/libs/fcm-push-18/ext/android/src/com/rhomobile/rhodes/fcm/FCMListener.java +88 -0
  102. data/libs/fcm-push-18/ext/build +16 -0
  103. data/libs/fcm-push-18/ext/build.bat +8 -0
  104. data/libs/fcm-push-18/ext/fcm.xml +9 -0
  105. data/libs/fcm-push-18/ext/iphone/ApplePush_Prefix.pch +7 -0
  106. data/libs/fcm-push-18/ext/iphone/Firebase.h +68 -0
  107. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/FirebaseAnalytics +0 -0
  108. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h +62 -0
  109. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics.h +115 -0
  110. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsConfiguration.h +1 -0
  111. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsSwiftNameSupport.h +13 -0
  112. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRApp.h +1 -0
  113. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRConfiguration.h +1 -0
  114. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIREventNames.h +389 -0
  115. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIROptions.h +1 -0
  116. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRParameterNames.h +485 -0
  117. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h +15 -0
  118. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h +10 -0
  119. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Modules/module.modulemap +10 -0
  120. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/FirebaseCore +0 -0
  121. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h +52 -0
  122. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FIRApp.h +130 -0
  123. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FIRConfiguration.h +78 -0
  124. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FIRLoggerLevel.h +35 -0
  125. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FIROptions.h +133 -0
  126. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FirebaseCore.h +5 -0
  127. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Modules/module.modulemap +7 -0
  128. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCoreDiagnostics.framework/FirebaseCoreDiagnostics +0 -0
  129. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCoreDiagnostics.framework/Modules/module.modulemap +6 -0
  130. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseInstanceID.framework/FirebaseInstanceID +0 -0
  131. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseInstanceID.framework/Headers/FIRInstanceID.h +276 -0
  132. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h +1 -0
  133. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseInstanceID.framework/Modules/module.modulemap +7 -0
  134. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseMessaging.framework/FirebaseMessaging +0 -0
  135. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseMessaging.framework/Headers/FIRMessaging.h +508 -0
  136. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseMessaging.framework/Headers/FirebaseMessaging.h +1 -0
  137. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseMessaging.framework/Modules/module.modulemap +8 -0
  138. data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseNanoPB.framework/FirebaseNanoPB +0 -0
  139. data/libs/fcm-push-18/ext/iphone/Frameworks/GoogleToolboxForMac.framework/GoogleToolboxForMac +0 -0
  140. data/libs/fcm-push-18/ext/iphone/Frameworks/GoogleToolboxForMac.framework/Modules/module.modulemap +5 -0
  141. data/libs/fcm-push-18/ext/iphone/Frameworks/Protobuf.framework/Modules/module.modulemap +5 -0
  142. data/libs/fcm-push-18/ext/iphone/Frameworks/Protobuf.framework/Protobuf +0 -0
  143. data/libs/fcm-push-18/ext/iphone/Frameworks/nanopb.framework/Modules/module.modulemap +5 -0
  144. data/libs/fcm-push-18/ext/iphone/Frameworks/nanopb.framework/nanopb +0 -0
  145. data/libs/fcm-push-18/ext/iphone/Rakefile +30 -0
  146. data/libs/fcm-push-18/ext/iphone/fcm-push.xcodeproj/project.pbxproj +370 -0
  147. data/libs/fcm-push-18/ext/iphone/impl/PushNotificationsReceiver.h +28 -0
  148. data/libs/fcm-push-18/ext/iphone/impl/PushNotificationsReceiver.m +27 -0
  149. data/libs/fcm-push-18/ext/iphone/impl/PushNotificationsReceiver.mm +234 -0
  150. data/libs/fcm-push-18/ext/iphone/impl/applePushSetup.c +10 -0
  151. data/libs/fcm-push-18/ext/iphone/impl/applepushclient.h +69 -0
  152. data/libs/fcm-push-18/ext/iphone/impl/applepushclient.mm +164 -0
  153. data/libs/fcm-push-18/ext/iphone/impl/readme.txt +7 -0
  154. data/libs/fcm-push-18/ext/platform/iphone/impl/readme.txt +7 -0
  155. data/libs/fcm-push-18/ext.yml +20 -0
  156. data/libs/nodejs/ext/platform/android/jxCore/jx.h +17 -1
  157. data/libs/nodejs/ext/platform/android/jxCore/libcares_arm.a +0 -0
  158. data/libs/nodejs/ext/platform/android/jxCore/libcares_ia32.a +0 -0
  159. data/libs/nodejs/ext/platform/android/jxCore/libcares_x64.a +0 -0
  160. data/libs/nodejs/ext/platform/android/jxCore/libchrome_zlib_arm.a +0 -0
  161. data/libs/nodejs/ext/platform/android/jxCore/libchrome_zlib_ia32.a +0 -0
  162. data/libs/nodejs/ext/platform/android/jxCore/libchrome_zlib_x64.a +0 -0
  163. data/libs/nodejs/ext/platform/android/jxCore/libhttp_parser_arm.a +0 -0
  164. data/libs/nodejs/ext/platform/android/jxCore/libhttp_parser_ia32.a +0 -0
  165. data/libs/nodejs/ext/platform/android/jxCore/libhttp_parser_x64.a +0 -0
  166. data/libs/nodejs/ext/platform/android/jxCore/libjx_arm.a +0 -0
  167. data/libs/nodejs/ext/platform/android/jxCore/libjx_ia32.a +0 -0
  168. data/libs/nodejs/ext/platform/android/jxCore/libjx_x64.a +0 -0
  169. data/libs/nodejs/ext/platform/android/jxCore/libopenssl_arm.a +0 -0
  170. data/libs/nodejs/ext/platform/android/jxCore/libopenssl_ia32.a +0 -0
  171. data/libs/nodejs/ext/platform/android/jxCore/libopenssl_x64.a +0 -0
  172. data/libs/nodejs/ext/platform/android/jxCore/libsqlite3_arm.a +0 -0
  173. data/libs/nodejs/ext/platform/android/jxCore/libsqlite3_ia32.a +0 -0
  174. data/libs/nodejs/ext/platform/android/jxCore/libsqlite3_x64.a +0 -0
  175. data/libs/nodejs/ext/platform/android/jxCore/libuv_arm.a +0 -0
  176. data/libs/nodejs/ext/platform/android/jxCore/libuv_ia32.a +0 -0
  177. data/libs/nodejs/ext/platform/android/jxCore/libuv_x64.a +0 -0
  178. data/libs/nodejs/ext/platform/android/jxCore/libv8_base_arm.a +0 -0
  179. data/libs/nodejs/ext/platform/android/jxCore/libv8_base_ia32.a +0 -0
  180. data/libs/nodejs/ext/platform/android/jxCore/libv8_base_x64.a +0 -0
  181. data/libs/nodejs/ext/platform/android/jxCore/libv8_nosnapshot_arm.a +0 -0
  182. data/libs/nodejs/ext/platform/android/jxCore/libv8_nosnapshot_ia32.a +0 -0
  183. data/libs/nodejs/ext/platform/android/jxCore/libv8_nosnapshot_x64.a +0 -0
  184. data/libs/nodejs/ext/platform/iphone/Nodejs.xcodeproj/project.pbxproj +8 -4
  185. data/libs/nodejs/ext/platform/iphone/Rakefile +9 -62
  186. data/libs/nodejs/ext/platform/iphone/jxCore/jx.h +17 -1
  187. data/libs/nodejs/ext/platform/iphone/jxCore/libcares.a +0 -0
  188. data/libs/nodejs/ext/platform/iphone/jxCore/libchrome_zlib.a +0 -0
  189. data/libs/nodejs/ext/platform/iphone/jxCore/libhttp_parser.a +0 -0
  190. data/libs/nodejs/ext/platform/iphone/jxCore/libjx.a +0 -0
  191. data/libs/nodejs/ext/platform/iphone/jxCore/libmozjs.a +0 -0
  192. data/libs/nodejs/ext/platform/iphone/jxCore/libopenssl.a +0 -0
  193. data/libs/nodejs/ext/platform/iphone/jxCore/libsqlite3.a +0 -0
  194. data/libs/nodejs/ext/platform/iphone/jxCore/libuv.a +0 -0
  195. data/libs/openssl.so-edge/ext/android/armeabi/libcrypto.a +0 -0
  196. data/libs/openssl.so-edge/ext/android/armeabi/libssl.a +0 -0
  197. data/libs/openssl.so-edge/ext/android/x86/libcrypto.a +0 -0
  198. data/libs/openssl.so-edge/ext/android/x86/libssl.a +0 -0
  199. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/asn1t.h +19 -0
  200. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/dso.h +23 -0
  201. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/thread_once.h +5 -2
  202. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/asn1.h +5 -2
  203. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/asn1t.h +5 -0
  204. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/bio.h +9 -12
  205. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/bn.h +1 -1
  206. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/buffer.h +1 -4
  207. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/conf.h +1 -0
  208. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/crypto.h +5 -1
  209. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ct.h +17 -2
  210. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/dh.h +24 -6
  211. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/dsa.h +1 -0
  212. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/e_os2.h +3 -16
  213. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ec.h +7 -12
  214. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/engine.h +0 -2
  215. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/err.h +3 -2
  216. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/evp.h +11 -1
  217. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/lhash.h +13 -0
  218. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/objects.h +2 -2
  219. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ocsp.h +3 -16
  220. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/opensslconf.h +20 -8
  221. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/opensslv.h +3 -3
  222. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/rsa.h +2 -0
  223. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/seed.h +1 -3
  224. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/srtp.h +1 -1
  225. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ssl.h +85 -52
  226. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ssl3.h +4 -1
  227. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/tls1.h +6 -6
  228. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ui.h +10 -0
  229. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/x509.h +1 -1
  230. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/x509_vfy.h +5 -0
  231. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/x509v3.h +1 -0
  232. data/libs/rexml-edge/rexml/attlistdecl.rb +63 -0
  233. data/libs/rexml-edge/rexml/attribute.rb +192 -0
  234. data/libs/rexml-edge/rexml/cdata.rb +68 -0
  235. data/libs/rexml-edge/rexml/child.rb +97 -0
  236. data/libs/rexml-edge/rexml/comment.rb +80 -0
  237. data/libs/rexml-edge/rexml/doctype.rb +270 -0
  238. data/libs/rexml-edge/rexml/document.rb +291 -0
  239. data/libs/rexml-edge/rexml/dtd/attlistdecl.rb +11 -0
  240. data/libs/rexml-edge/rexml/dtd/dtd.rb +47 -0
  241. data/libs/rexml-edge/rexml/dtd/elementdecl.rb +18 -0
  242. data/libs/rexml-edge/rexml/dtd/entitydecl.rb +57 -0
  243. data/libs/rexml-edge/rexml/dtd/notationdecl.rb +40 -0
  244. data/libs/rexml-edge/rexml/element.rb +1241 -0
  245. data/libs/rexml-edge/rexml/encoding.rb +51 -0
  246. data/libs/rexml-edge/rexml/entity.rb +174 -0
  247. data/libs/rexml-edge/rexml/formatters/default.rb +112 -0
  248. data/libs/rexml-edge/rexml/formatters/pretty.rb +142 -0
  249. data/libs/rexml-edge/rexml/formatters/transitive.rb +58 -0
  250. data/libs/rexml-edge/rexml/functions.rb +418 -0
  251. data/libs/rexml-edge/rexml/instruction.rb +71 -0
  252. data/libs/rexml-edge/rexml/light/node.rb +196 -0
  253. data/libs/rexml-edge/rexml/namespace.rb +48 -0
  254. data/libs/rexml-edge/rexml/node.rb +76 -0
  255. data/libs/rexml-edge/rexml/output.rb +30 -0
  256. data/libs/rexml-edge/rexml/parent.rb +166 -0
  257. data/libs/rexml-edge/rexml/parseexception.rb +52 -0
  258. data/libs/rexml-edge/rexml/parsers/baseparser.rb +533 -0
  259. data/libs/rexml-edge/rexml/parsers/lightparser.rb +59 -0
  260. data/libs/rexml-edge/rexml/parsers/pullparser.rb +197 -0
  261. data/libs/rexml-edge/rexml/parsers/sax2parser.rb +273 -0
  262. data/libs/rexml-edge/rexml/parsers/streamparser.rb +61 -0
  263. data/libs/rexml-edge/rexml/parsers/treeparser.rb +101 -0
  264. data/libs/rexml-edge/rexml/parsers/ultralightparser.rb +57 -0
  265. data/libs/rexml-edge/rexml/parsers/xpathparser.rb +657 -0
  266. data/libs/rexml-edge/rexml/quickpath.rb +266 -0
  267. data/libs/rexml-edge/rexml/rexml.rb +32 -0
  268. data/libs/rexml-edge/rexml/sax2listener.rb +98 -0
  269. data/libs/rexml-edge/rexml/security.rb +28 -0
  270. data/libs/rexml-edge/rexml/source.rb +297 -0
  271. data/libs/rexml-edge/rexml/streamlistener.rb +93 -0
  272. data/libs/rexml-edge/rexml/syncenumerator.rb +33 -0
  273. data/libs/rexml-edge/rexml/text.rb +426 -0
  274. data/libs/rexml-edge/rexml/undefinednamespaceexception.rb +9 -0
  275. data/libs/rexml-edge/rexml/validation/relaxng.rb +539 -0
  276. data/libs/rexml-edge/rexml/validation/validation.rb +144 -0
  277. data/libs/rexml-edge/rexml/validation/validationexception.rb +10 -0
  278. data/libs/rexml-edge/rexml/xmldecl.rb +116 -0
  279. data/libs/rexml-edge/rexml/xmltokens.rb +85 -0
  280. data/libs/rexml-edge/rexml/xpath.rb +81 -0
  281. data/libs/rexml-edge/rexml/xpath_parser.rb +704 -0
  282. data/version +1 -1
  283. metadata +144 -27
  284. data/libs/crosswalk/ext/platform/android/adds/res/drawable/launchscreen_bg.xml +0 -19
  285. data/libs/crosswalk/ext/platform/android/adds/res/drawable-hdpi/crosswalk.png +0 -0
  286. data/libs/crosswalk/ext/platform/android/adds/res/drawable-ldpi/crosswalk.png +0 -0
  287. data/libs/crosswalk/ext/platform/android/adds/res/drawable-mdpi/crosswalk.png +0 -0
  288. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xhdpi/crosswalk.png +0 -0
  289. data/libs/crosswalk/ext/platform/android/adds/res/layout/autofill_suggestion_item.xml +0 -7
  290. data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/autofill_suggestion_item.xml +0 -18
  291. data/libs/crosswalk/ext/platform/android/adds/res/raw/contacts_api.js +0 -206
  292. data/libs/crosswalk/ext/platform/android/adds/res/raw/device_capabilities_api.js +0 -231
  293. data/libs/crosswalk/ext/platform/android/adds/res/raw/messaging_api.js +0 -359
  294. data/libs/crosswalk/ext/platform/android/adds/res/raw/presentation_api.js +0 -144
  295. data/libs/crosswalk/ext/platform/android/adds/res/values/ui_java_attrs.xml +0 -9
  296. data/libs/crosswalk/ext/platform/android/adds/res/values-v14/theme.xml +0 -16
@@ -0,0 +1,418 @@
1
+ # frozen_string_literal: false
2
+ module REXML
3
+ # If you add a method, keep in mind two things:
4
+ # (1) the first argument will always be a list of nodes from which to
5
+ # filter. In the case of context methods (such as position), the function
6
+ # should return an array with a value for each child in the array.
7
+ # (2) all method calls from XML will have "-" replaced with "_".
8
+ # Therefore, in XML, "local-name()" is identical (and actually becomes)
9
+ # "local_name()"
10
+ module Functions
11
+ @@available_functions = {}
12
+ @@context = nil
13
+ @@namespace_context = {}
14
+ @@variables = {}
15
+
16
+ INTERNAL_METHODS = [
17
+ :namespace_context,
18
+ :namespace_context=,
19
+ :variables,
20
+ :variables=,
21
+ :context=,
22
+ :get_namespace,
23
+ :send,
24
+ ]
25
+ class << self
26
+ def singleton_method_added(name)
27
+ unless INTERNAL_METHODS.include?(name)
28
+ @@available_functions[name] = true
29
+ end
30
+ end
31
+ end
32
+
33
+ def Functions::namespace_context=(x) ; @@namespace_context=x ; end
34
+ def Functions::variables=(x) ; @@variables=x ; end
35
+ def Functions::namespace_context ; @@namespace_context ; end
36
+ def Functions::variables ; @@variables ; end
37
+
38
+ def Functions::context=(value); @@context = value; end
39
+
40
+ def Functions::text( )
41
+ if @@context[:node].node_type == :element
42
+ return @@context[:node].find_all{|n| n.node_type == :text}.collect{|n| n.value}
43
+ elsif @@context[:node].node_type == :text
44
+ return @@context[:node].value
45
+ else
46
+ return false
47
+ end
48
+ end
49
+
50
+ # Returns the last node of the given list of nodes.
51
+ def Functions::last( )
52
+ @@context[:size]
53
+ end
54
+
55
+ def Functions::position( )
56
+ @@context[:index]
57
+ end
58
+
59
+ # Returns the size of the given list of nodes.
60
+ def Functions::count( node_set )
61
+ node_set.size
62
+ end
63
+
64
+ # Since REXML is non-validating, this method is not implemented as it
65
+ # requires a DTD
66
+ def Functions::id( object )
67
+ end
68
+
69
+ # UNTESTED
70
+ def Functions::local_name( node_set=nil )
71
+ get_namespace( node_set ) do |node|
72
+ return node.local_name
73
+ end
74
+ end
75
+
76
+ def Functions::namespace_uri( node_set=nil )
77
+ get_namespace( node_set ) {|node| node.namespace}
78
+ end
79
+
80
+ def Functions::name( node_set=nil )
81
+ get_namespace( node_set ) do |node|
82
+ node.expanded_name
83
+ end
84
+ end
85
+
86
+ # Helper method.
87
+ def Functions::get_namespace( node_set = nil )
88
+ if node_set == nil
89
+ yield @@context[:node] if defined? @@context[:node].namespace
90
+ else
91
+ if node_set.respond_to? :each
92
+ node_set.each { |node| yield node if defined? node.namespace }
93
+ elsif node_set.respond_to? :namespace
94
+ yield node_set
95
+ end
96
+ end
97
+ end
98
+
99
+ # A node-set is converted to a string by returning the string-value of the
100
+ # node in the node-set that is first in document order. If the node-set is
101
+ # empty, an empty string is returned.
102
+ #
103
+ # A number is converted to a string as follows
104
+ #
105
+ # NaN is converted to the string NaN
106
+ #
107
+ # positive zero is converted to the string 0
108
+ #
109
+ # negative zero is converted to the string 0
110
+ #
111
+ # positive infinity is converted to the string Infinity
112
+ #
113
+ # negative infinity is converted to the string -Infinity
114
+ #
115
+ # if the number is an integer, the number is represented in decimal form
116
+ # as a Number with no decimal point and no leading zeros, preceded by a
117
+ # minus sign (-) if the number is negative
118
+ #
119
+ # otherwise, the number is represented in decimal form as a Number
120
+ # including a decimal point with at least one digit before the decimal
121
+ # point and at least one digit after the decimal point, preceded by a
122
+ # minus sign (-) if the number is negative; there must be no leading zeros
123
+ # before the decimal point apart possibly from the one required digit
124
+ # immediately before the decimal point; beyond the one required digit
125
+ # after the decimal point there must be as many, but only as many, more
126
+ # digits as are needed to uniquely distinguish the number from all other
127
+ # IEEE 754 numeric values.
128
+ #
129
+ # The boolean false value is converted to the string false. The boolean
130
+ # true value is converted to the string true.
131
+ #
132
+ # An object of a type other than the four basic types is converted to a
133
+ # string in a way that is dependent on that type.
134
+ def Functions::string( object=nil )
135
+ #object = @context unless object
136
+ if object.instance_of? Array
137
+ string( object[0] )
138
+ elsif defined? object.node_type
139
+ if object.node_type == :attribute
140
+ object.value
141
+ elsif object.node_type == :element || object.node_type == :document
142
+ string_value(object)
143
+ else
144
+ object.to_s
145
+ end
146
+ elsif object.nil?
147
+ return ""
148
+ else
149
+ object.to_s
150
+ end
151
+ end
152
+
153
+ # A node-set is converted to a string by
154
+ # returning the concatenation of the string-value
155
+ # of each of the children of the node in the
156
+ # node-set that is first in document order.
157
+ # If the node-set is empty, an empty string is returned.
158
+ def Functions::string_value( o )
159
+ rv = ""
160
+ o.children.each { |e|
161
+ if e.node_type == :text
162
+ rv << e.to_s
163
+ elsif e.node_type == :element
164
+ rv << string_value( e )
165
+ end
166
+ }
167
+ rv
168
+ end
169
+
170
+ # UNTESTED
171
+ def Functions::concat( *objects )
172
+ objects.join
173
+ end
174
+
175
+ # Fixed by Mike Stok
176
+ def Functions::starts_with( string, test )
177
+ string(string).index(string(test)) == 0
178
+ end
179
+
180
+ # Fixed by Mike Stok
181
+ def Functions::contains( string, test )
182
+ string(string).include?(string(test))
183
+ end
184
+
185
+ # Kouhei fixed this
186
+ def Functions::substring_before( string, test )
187
+ ruby_string = string(string)
188
+ ruby_index = ruby_string.index(string(test))
189
+ if ruby_index.nil?
190
+ ""
191
+ else
192
+ ruby_string[ 0...ruby_index ]
193
+ end
194
+ end
195
+
196
+ # Kouhei fixed this too
197
+ def Functions::substring_after( string, test )
198
+ ruby_string = string(string)
199
+ return $1 if ruby_string =~ /#{test}(.*)/
200
+ ""
201
+ end
202
+
203
+ # Take equal portions of Mike Stok and Sean Russell; mix
204
+ # vigorously, and pour into a tall, chilled glass. Serves 10,000.
205
+ def Functions::substring( string, start, length=nil )
206
+ ruby_string = string(string)
207
+ ruby_length = if length.nil?
208
+ ruby_string.length.to_f
209
+ else
210
+ number(length)
211
+ end
212
+ ruby_start = number(start)
213
+
214
+ # Handle the special cases
215
+ return '' if (
216
+ ruby_length.nan? or
217
+ ruby_start.nan? or
218
+ ruby_start.infinite?
219
+ )
220
+
221
+ infinite_length = ruby_length.infinite? == 1
222
+ ruby_length = ruby_string.length if infinite_length
223
+
224
+ # Now, get the bounds. The XPath bounds are 1..length; the ruby bounds
225
+ # are 0..length. Therefore, we have to offset the bounds by one.
226
+ ruby_start = ruby_start.round - 1
227
+ ruby_length = ruby_length.round
228
+
229
+ if ruby_start < 0
230
+ ruby_length += ruby_start unless infinite_length
231
+ ruby_start = 0
232
+ end
233
+ return '' if ruby_length <= 0
234
+ ruby_string[ruby_start,ruby_length]
235
+ end
236
+
237
+ # UNTESTED
238
+ def Functions::string_length( string )
239
+ string(string).length
240
+ end
241
+
242
+ # UNTESTED
243
+ def Functions::normalize_space( string=nil )
244
+ string = string(@@context[:node]) if string.nil?
245
+ if string.kind_of? Array
246
+ string.collect{|x| string.to_s.strip.gsub(/\s+/um, ' ') if string}
247
+ else
248
+ string.to_s.strip.gsub(/\s+/um, ' ')
249
+ end
250
+ end
251
+
252
+ # This is entirely Mike Stok's beast
253
+ def Functions::translate( string, tr1, tr2 )
254
+ from = string(tr1)
255
+ to = string(tr2)
256
+
257
+ # the map is our translation table.
258
+ #
259
+ # if a character occurs more than once in the
260
+ # from string then we ignore the second &
261
+ # subsequent mappings
262
+ #
263
+ # if a character maps to nil then we delete it
264
+ # in the output. This happens if the from
265
+ # string is longer than the to string
266
+ #
267
+ # there's nothing about - or ^ being special in
268
+ # http://www.w3.org/TR/xpath#function-translate
269
+ # so we don't build ranges or negated classes
270
+
271
+ map = Hash.new
272
+ 0.upto(from.length - 1) { |pos|
273
+ from_char = from[pos]
274
+ unless map.has_key? from_char
275
+ map[from_char] =
276
+ if pos < to.length
277
+ to[pos]
278
+ else
279
+ nil
280
+ end
281
+ end
282
+ }
283
+
284
+ if ''.respond_to? :chars
285
+ string(string).chars.collect { |c|
286
+ if map.has_key? c then map[c] else c end
287
+ }.compact.join
288
+ else
289
+ string(string).unpack('U*').collect { |c|
290
+ if map.has_key? c then map[c] else c end
291
+ }.compact.pack('U*')
292
+ end
293
+ end
294
+
295
+ # UNTESTED
296
+ def Functions::boolean( object=nil )
297
+ if object.kind_of? String
298
+ if object =~ /\d+/u
299
+ return object.to_f != 0
300
+ else
301
+ return object.size > 0
302
+ end
303
+ elsif object.kind_of? Array
304
+ object = object.find{|x| x and true}
305
+ end
306
+ return object ? true : false
307
+ end
308
+
309
+ # UNTESTED
310
+ def Functions::not( object )
311
+ not boolean( object )
312
+ end
313
+
314
+ # UNTESTED
315
+ def Functions::true( )
316
+ true
317
+ end
318
+
319
+ # UNTESTED
320
+ def Functions::false( )
321
+ false
322
+ end
323
+
324
+ # UNTESTED
325
+ def Functions::lang( language )
326
+ lang = false
327
+ node = @@context[:node]
328
+ attr = nil
329
+ until node.nil?
330
+ if node.node_type == :element
331
+ attr = node.attributes["xml:lang"]
332
+ unless attr.nil?
333
+ lang = compare_language(string(language), attr)
334
+ break
335
+ else
336
+ end
337
+ end
338
+ node = node.parent
339
+ end
340
+ lang
341
+ end
342
+
343
+ def Functions::compare_language lang1, lang2
344
+ lang2.downcase.index(lang1.downcase) == 0
345
+ end
346
+
347
+ # a string that consists of optional whitespace followed by an optional
348
+ # minus sign followed by a Number followed by whitespace is converted to
349
+ # the IEEE 754 number that is nearest (according to the IEEE 754
350
+ # round-to-nearest rule) to the mathematical value represented by the
351
+ # string; any other string is converted to NaN
352
+ #
353
+ # boolean true is converted to 1; boolean false is converted to 0
354
+ #
355
+ # a node-set is first converted to a string as if by a call to the string
356
+ # function and then converted in the same way as a string argument
357
+ #
358
+ # an object of a type other than the four basic types is converted to a
359
+ # number in a way that is dependent on that type
360
+ def Functions::number( object=nil )
361
+ object = @@context[:node] unless object
362
+ case object
363
+ when true
364
+ Float(1)
365
+ when false
366
+ Float(0)
367
+ when Array
368
+ number(string( object ))
369
+ when Numeric
370
+ object.to_f
371
+ else
372
+ str = string( object )
373
+ # If XPath ever gets scientific notation...
374
+ #if str =~ /^\s*-?(\d*\.?\d+|\d+\.)([Ee]\d*)?\s*$/
375
+ if str =~ /^\s*-?(\d*\.?\d+|\d+\.)\s*$/
376
+ str.to_f
377
+ else
378
+ (0.0 / 0.0)
379
+ end
380
+ end
381
+ end
382
+
383
+ def Functions::sum( nodes )
384
+ nodes = [nodes] unless nodes.kind_of? Array
385
+ nodes.inject(0) { |r,n| r + number(string(n)) }
386
+ end
387
+
388
+ def Functions::floor( number )
389
+ number(number).floor
390
+ end
391
+
392
+ def Functions::ceiling( number )
393
+ number(number).ceil
394
+ end
395
+
396
+ def Functions::round( number )
397
+ begin
398
+ number(number).round
399
+ rescue FloatDomainError
400
+ number(number)
401
+ end
402
+ end
403
+
404
+ def Functions::processing_instruction( node )
405
+ node.node_type == :processing_instruction
406
+ end
407
+
408
+ def Functions::send(name, *args)
409
+ if @@available_functions[name.to_sym]
410
+ super
411
+ else
412
+ # TODO: Maybe, this is not XPath spec behavior.
413
+ # This behavior must be reconsidered.
414
+ XPath.match(@@context[:node], name.to_s)
415
+ end
416
+ end
417
+ end
418
+ end
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: false
2
+ require "rexml/child"
3
+ require "rexml/source"
4
+
5
+ module REXML
6
+ # Represents an XML Instruction; IE, <? ... ?>
7
+ # TODO: Add parent arg (3rd arg) to constructor
8
+ class Instruction < Child
9
+ START = '<\?'
10
+ STOP = '\?>'
11
+
12
+ # target is the "name" of the Instruction; IE, the "tag" in <?tag ...?>
13
+ # content is everything else.
14
+ attr_accessor :target, :content
15
+
16
+ # Constructs a new Instruction
17
+ # @param target can be one of a number of things. If String, then
18
+ # the target of this instruction is set to this. If an Instruction,
19
+ # then the Instruction is shallowly cloned (target and content are
20
+ # copied). If a Source, then the source is scanned and parsed for
21
+ # an Instruction declaration.
22
+ # @param content Must be either a String, or a Parent. Can only
23
+ # be a Parent if the target argument is a Source. Otherwise, this
24
+ # String is set as the content of this instruction.
25
+ def initialize(target, content=nil)
26
+ if target.kind_of? String
27
+ super()
28
+ @target = target
29
+ @content = content
30
+ elsif target.kind_of? Instruction
31
+ super(content)
32
+ @target = target.target
33
+ @content = target.content
34
+ end
35
+ @content.strip! if @content
36
+ end
37
+
38
+ def clone
39
+ Instruction.new self
40
+ end
41
+
42
+ # == DEPRECATED
43
+ # See the rexml/formatters package
44
+ #
45
+ def write writer, indent=-1, transitive=false, ie_hack=false
46
+ Kernel.warn( "#{self.class.name}.write is deprecated" )
47
+ indent(writer, indent)
48
+ writer << START.sub(/\\/u, '')
49
+ writer << @target
50
+ writer << ' '
51
+ writer << @content
52
+ writer << STOP.sub(/\\/u, '')
53
+ end
54
+
55
+ # @return true if other is an Instruction, and the content and target
56
+ # of the other matches the target and content of this object.
57
+ def ==( other )
58
+ other.kind_of? Instruction and
59
+ other.target == @target and
60
+ other.content == @content
61
+ end
62
+
63
+ def node_type
64
+ :processing_instruction
65
+ end
66
+
67
+ def inspect
68
+ "<?p-i #{target} ...?>"
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,196 @@
1
+ # frozen_string_literal: false
2
+ require 'rexml/xmltokens'
3
+
4
+ # [ :element, parent, name, attributes, children* ]
5
+ # a = Node.new
6
+ # a << "B" # => <a>B</a>
7
+ # a.b # => <a>B<b/></a>
8
+ # a.b[1] # => <a>B<b/><b/><a>
9
+ # a.b[1]["x"] = "y" # => <a>B<b/><b x="y"/></a>
10
+ # a.b[0].c # => <a>B<b><c/></b><b x="y"/></a>
11
+ # a.b.c << "D" # => <a>B<b><c>D</c></b><b x="y"/></a>
12
+ module REXML
13
+ module Light
14
+ # Represents a tagged XML element. Elements are characterized by
15
+ # having children, attributes, and names, and can themselves be
16
+ # children.
17
+ class Node
18
+ NAMESPLIT = /^(?:(#{XMLTokens::NCNAME_STR}):)?(#{XMLTokens::NCNAME_STR})/u
19
+ PARENTS = [ :element, :document, :doctype ]
20
+ # Create a new element.
21
+ def initialize node=nil
22
+ @node = node
23
+ if node.kind_of? String
24
+ node = [ :text, node ]
25
+ elsif node.nil?
26
+ node = [ :document, nil, nil ]
27
+ elsif node[0] == :start_element
28
+ node[0] = :element
29
+ elsif node[0] == :start_doctype
30
+ node[0] = :doctype
31
+ elsif node[0] == :start_document
32
+ node[0] = :document
33
+ end
34
+ end
35
+
36
+ def size
37
+ if PARENTS.include? @node[0]
38
+ @node[-1].size
39
+ else
40
+ 0
41
+ end
42
+ end
43
+
44
+ def each
45
+ size.times { |x| yield( at(x+4) ) }
46
+ end
47
+
48
+ def name
49
+ at(2)
50
+ end
51
+
52
+ def name=( name_str, ns=nil )
53
+ pfx = ''
54
+ pfx = "#{prefix(ns)}:" if ns
55
+ _old_put(2, "#{pfx}#{name_str}")
56
+ end
57
+
58
+ def parent=( node )
59
+ _old_put(1,node)
60
+ end
61
+
62
+ def local_name
63
+ namesplit
64
+ @name
65
+ end
66
+
67
+ def local_name=( name_str )
68
+ _old_put( 1, "#@prefix:#{name_str}" )
69
+ end
70
+
71
+ def prefix( namespace=nil )
72
+ prefix_of( self, namespace )
73
+ end
74
+
75
+ def namespace( prefix=prefix() )
76
+ namespace_of( self, prefix )
77
+ end
78
+
79
+ def namespace=( namespace )
80
+ @prefix = prefix( namespace )
81
+ pfx = ''
82
+ pfx = "#@prefix:" if @prefix.size > 0
83
+ _old_put(1, "#{pfx}#@name")
84
+ end
85
+
86
+ def []( reference, ns=nil )
87
+ if reference.kind_of? String
88
+ pfx = ''
89
+ pfx = "#{prefix(ns)}:" if ns
90
+ at(3)["#{pfx}#{reference}"]
91
+ elsif reference.kind_of? Range
92
+ _old_get( Range.new(4+reference.begin, reference.end, reference.exclude_end?) )
93
+ else
94
+ _old_get( 4+reference )
95
+ end
96
+ end
97
+
98
+ def =~( path )
99
+ XPath.match( self, path )
100
+ end
101
+
102
+ # Doesn't handle namespaces yet
103
+ def []=( reference, ns, value=nil )
104
+ if reference.kind_of? String
105
+ value = ns unless value
106
+ at( 3 )[reference] = value
107
+ elsif reference.kind_of? Range
108
+ _old_put( Range.new(3+reference.begin, reference.end, reference.exclude_end?), ns )
109
+ else
110
+ if value
111
+ _old_put( 4+reference, ns, value )
112
+ else
113
+ _old_put( 4+reference, ns )
114
+ end
115
+ end
116
+ end
117
+
118
+ # Append a child to this element, optionally under a provided namespace.
119
+ # The namespace argument is ignored if the element argument is an Element
120
+ # object. Otherwise, the element argument is a string, the namespace (if
121
+ # provided) is the namespace the element is created in.
122
+ def << element
123
+ if node_type() == :text
124
+ at(-1) << element
125
+ else
126
+ newnode = Node.new( element )
127
+ newnode.parent = self
128
+ self.push( newnode )
129
+ end
130
+ at(-1)
131
+ end
132
+
133
+ def node_type
134
+ _old_get(0)
135
+ end
136
+
137
+ def text=( foo )
138
+ replace = at(4).kind_of?(String)? 1 : 0
139
+ self._old_put(4,replace, normalizefoo)
140
+ end
141
+
142
+ def root
143
+ context = self
144
+ context = context.at(1) while context.at(1)
145
+ end
146
+
147
+ def has_name?( name, namespace = '' )
148
+ at(3) == name and namespace() == namespace
149
+ end
150
+
151
+ def children
152
+ self
153
+ end
154
+
155
+ def parent
156
+ at(1)
157
+ end
158
+
159
+ def to_s
160
+
161
+ end
162
+
163
+ private
164
+
165
+ def namesplit
166
+ return if @name.defined?
167
+ at(2) =~ NAMESPLIT
168
+ @prefix = '' || $1
169
+ @name = $2
170
+ end
171
+
172
+ def namespace_of( node, prefix=nil )
173
+ if not prefix
174
+ name = at(2)
175
+ name =~ NAMESPLIT
176
+ prefix = $1
177
+ end
178
+ to_find = 'xmlns'
179
+ to_find = "xmlns:#{prefix}" if not prefix.nil?
180
+ ns = at(3)[ to_find ]
181
+ ns ? ns : namespace_of( @node[0], prefix )
182
+ end
183
+
184
+ def prefix_of( node, namespace=nil )
185
+ if not namespace
186
+ name = node.name
187
+ name =~ NAMESPLIT
188
+ $1
189
+ else
190
+ ns = at(3).find { |k,v| v == namespace }
191
+ ns ? ns : prefix_of( node.parent, namespace )
192
+ end
193
+ end
194
+ end
195
+ end
196
+ end