Skip to content

Commit

Permalink
[fix] xml_parser: Attributes do NOT get default namespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
akoprow committed May 18, 2012
1 parent 8b10bce commit fe5cc09
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions opalang/classic_syntax/xml_parser.trx
@@ -1,5 +1,5 @@
(*
Copyright © 2011 MLstate
Copyright © 2011, 2012 MLstate

This file is part of OPA.

Expand Down Expand Up @@ -86,7 +86,11 @@ attribute_lhs <- Xml.namespace:ns Xml.deco_ename:name spacing
| _ ->
let ns =
let string, label = ns in
(SA.Ident ("xmlns:"^string), label) in
if string = "" then
(SA.Const (SA.CString ""), label)
else
(SA.Ident ("xmlns:"^string), label)
in
`normal_attr {namespace = ns; name = name} }}
attribute_value <- ( String_expr.string_with_opa:e {{ XmlAttrStringParser e }}
/ Opa_parser.opa_in_braces:e {{ XmlAttrParser e }}
Expand Down

0 comments on commit fe5cc09

Please sign in to comment.