Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[fix] xml_parser: Attributes do NOT get default namespace.

  • Loading branch information...
commit fe5cc09c7154a7fc0424da35192194227ead775c 1 parent 8b10bce
Adam Koprowski akoprow authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 opalang/classic_syntax/xml_parser.trx
8 opalang/classic_syntax/xml_parser.trx
View
@@ -1,5 +1,5 @@
(*
- Copyright © 2011 MLstate
+ Copyright © 2011, 2012 MLstate
This file is part of OPA.
@@ -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 }}
Please sign in to comment.
Something went wrong with that request. Please try again.