Age | Commit message (Collapse) | Author |
|
Namespace nodes are represented as `#xmlNsNode` records.
Now that the namespace axis is correctly implemented, attributes nodes
corresponding to attributes that declare namespaces are ignored.
See [5.3 Attribute Nodes][xpath-5.3]:
> There are no attribute nodes corresponding to attributes
> that declare namespaces.
[xpath-5.3]: http://www.w3.org/TR/xpath/#attribute-nodes
|
|
|
|
|
|
|
|
This change allows numbers and literals to be used as top-level primary
expressions without failing:
1> xmerl_xpath:string("3", Doc).
#xmlObj{type = number,value = 3}
2> xmerl_xpath:string("'foo'", Doc).
#xmlObj{type = string,value = "foo"}
We still need to allow arithmetic, comparative, boolean and negative
expressions, as in `xmerl_xpath_pred:expr/2`.
|
|
|
|
When `default_attrs` is `true`, any attribute with a default value defined
in the doctype but not in the attribute axis of the currently scanned
element is added to it.
|
|
Functions `xmerl_scan:file/2` and `xmerl_scan:string/2` now accepts a
new option `{document, true}` to produce a whole document as a
`xmlDocument` record instead of just the root element node.
You may wonder why this would be useful, this option is the only way to
get to the top-level comments and processing instructions without
hooking through the customization functions. Those nodes are needed to
implement [Canonical XML][c14n-xml] support.
[c14n-xml]: http://www.w3.org/TR/2008/PR-xml-c14n11-20080129/
"Canonical XML"
|
|
|
|
|
|
|
|
See [Namespaces in XML 1.0 (Third Edition)][1]:
> The prefix xml is by definition bound to the namespace name
> http://www.w3.org/XML/1998/namespace. It MAY, but need not, be
> declared, and MUST NOT be bound to any other namespace name. Other
> prefixes MUST NOT be bound to this namespace name, and it MUST NOT be
> declared as the default namespace.
>
> The prefix xmlns is used only to declare namespace bindings and is by
> definition bound to the namespace name http://www.w3.org/2000/xmlns/.
> It MUST NOT be declared . Other prefixes MUST NOT be bound to this
> namespace name, and it MUST NOT be declared as the default namespace.
> Element names MUST NOT have the prefix xmlns.
>
> In XML documents conforming to this specification, no tag may containe
> two attributes which have identical names, or have qualified names
> with the same local part and with prefixes which have been bound to
> namespace names that are identical.
[1] http://www.w3.org/TR/REC-xml-names/
|
|
* dev:
Update copyright years
|
|
|
|
* dev:
[xmerl] Fix streaming bug in xmerl_scan (Thanks to Simon Cornish)
|
|
|
|
Conflicts:
erts/aclocal.m4
erts/include/internal/ethread_header_config.h.in
|
|
* ta/docs-fixes:
Fix misspelling of intermediate
Fix typos in erts/preloaded/src
Fix more misspellings of compatibility
Fix misspelling of kept
Fix misspelling of compatibility in ssl_basic_SUITE
Fix misspelling of compatibility
Fix misspelling of accommodate
Fix misspelling of exceed
Fix misspelling of accidentally
Fix misspelling of erroneous in xmerl_xsd
Fix misspelling of erroneous
Fix misspelling of successful
Fix typos in instrument(3)
Fix typos in dbg(3)
dialyzer: fix a small typo in list_to_bitstring test
Fix typos in cover.erl
Fix typos (variable name) in erl_nif(3)
Fix typos in mod_esi(3)
Fix trivial typos in erlang(3)
OTP-9555
|
|
* dj/xmerl_ucs-latin9-support:
Add latin9 (iso-8859-15) support in xmerl_ucs
OTP-9552
|
|
|
|
Corrected number of shift bytes in xmerl_ucs:char_to_ucs2le and
recursive call from from_ucs2le to from_ucs4le.
|
|
This commit is a preparation for introducing location information
(filename/line number) in stacktraces in exceptions. Currently
a stack trace looks like:
[{Mod1,Function1,Arity1},
.
.
.
{ModN,FunctionN,ArityN}]
Add a forth element to each tuple that can be used indication
the filename and line number of the source file:
[{Mod1,Function1,Arity1,Location1},
.
.
.
{ModN,FunctionN,ArityN,LocationN}]
In this commit, the fourth element will just be an empty list,
and we will change all code that look at or manipulate stacktraces.
|
|
* lars/xmerl/attr_val_bug/OTP-9411:
Added test case for ticket 9411.
Entity replacement in attributes doesn't work poperly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OTP-9274
|
|
Section 3.3.3 of the XML Recommendation gives the rules for
attribute-value normalization. One of those rules requires
that character references not be re-normalized after being
replaced with the referenced characters:
For a character reference, append the referenced
character to the normalized value.
And, in particular:
Note that if the unnormalized attribute value contains
a character reference to a white space character other
than space (#x20), the normalized value contains the
referenced character itself (#xD, #xA or #x9).
Source: http://www.w3.org/TR/xml/#AVNormalize
In xmerl_scan, however, character references in attributes are
normalized an extra time after replacement. For example, the
character reference "
" in the following XML document gets
normalized (incorrectly) into a space when parsed:
2> xmerl_scan:string("<root x='
'/>").
{... [{xmlAttribute,x,[],[],[],[],1,[]," ",false}] ...}
This short patch restores the correct behavior:
2> xmerl_scan:string("<root x='
'/>").
{... [{xmlAttribute,x,[],[],[],[],1,[],"\n",false}] ...}
NOTE: This change does not include tests because I could not
find a test suite for xmerl.
|
|
|
|
|
|
|
|
|
|
The function xmerl_lib:expand_content/1 is mainly for expanding
Simple XML, but can also handle xmerl records. This patch fixes
an omission that caused expand_content/1 to not maintain the
'parents' list when expanding #xmlElement{} records.
No test cases written, since the xmerl test suites have not yet been
released.
|
|
fatal error.
|
|
warnings/errors in man pages
|
|
|
|
|
|
|
|
|