文件
mynode/packages/fork-sax/test/xmlns-xml-default-ns.js
chen 301194963b
一些检查失败了
automerge / automerge (push) Has been cancelled
react-native-android-build-apk / AssembleRelease (push) Has been cancelled
Build macOS M1 / Main (push) Has been cancelled
Joplin Continuous Integration / Main (macos-15-intel) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-11-vs2026-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-2025) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04-arm) (push) Has been cancelled
Joplin UI tests / Main (ubuntu-22.04) (push) Has been cancelled
Joplin UI tests / Main (windows-2025) (push) Has been cancelled
Joplin UI tests / Mobile (push) Has been cancelled
Close stale issues / ProcessStaleIssues (push) Has been cancelled
feat: Initial clean release of CHM
2026-11-04 11:29:39 +08:00

72 行
1.0 KiB
JavaScript

var xmlnsAttr = {
name: 'xmlns',
value: 'http://foo',
prefix: 'xmlns',
local: '',
uri: 'http://www.w3.org/2000/xmlns/'
}
var attrAttr = {
name: 'attr',
value: 'bar',
prefix: '',
local: 'attr',
uri: ''
}
require(__dirname).test({
xml: "<elm xmlns='http://foo' attr='bar'/>",
expect: [
[
'opentagstart',
{
name: 'elm',
attributes: {},
ns: {}
}
],
[
'opennamespace',
{ prefix: '', uri: 'http://foo' }
],
[
'attribute',
xmlnsAttr
],
[
'attribute',
attrAttr
],
[
'opentag',
{
name: 'elm',
prefix: '',
local: 'elm',
uri: 'http://foo',
ns: { '': 'http://foo' },
attributes: {
xmlns: xmlnsAttr,
attr: attrAttr
},
isSelfClosing: true
}
],
[
'closetag',
'elm'
],
[
'closenamespace',
{
prefix: '',
uri: 'http://foo'
}
]
],
strict: true,
opt: {
xmlns: true
}
})