Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
96c0902b
Commit
96c0902b
authored
Jul 10, 2007
by
Pietro Abate
Browse files
[r2005-01-03 16:22:00 by afrisch] Don't generate xmlns:xml declaration
Original author: afrisch Date: 2005-01-03 16:22:38+00:00
parent
4849263a
Changes
2
Show whitespace changes
Inline
Side-by-side
misc/ns.ml
View file @
96c0902b
(* TODO:
special treatment of prefixes xml and xmlns *)
special treatment of prefixes xml and xmlns.
Disallow: namespace xml="..."
*)
module
U
=
Encodings
.
Utf8
let
empty_str
=
U
.
mk
""
...
...
@@ -166,7 +168,8 @@ module Printer = struct
then
p
.
prefixes
<-
(
pr
,
ns
)
::
p
.
prefixes
let
register_ns
p
ns
=
match
get_prefix
p
ns
with
if
ns
==
xml_ns
then
()
else
match
get_prefix
p
ns
with
|
{
contents
=
Hint
l
}
as
r
->
let
pr
=
find_good_prefix
p
ns
l
in
r
:=
Set
pr
;
...
...
@@ -179,7 +182,8 @@ module Printer = struct
let
prefixes
p
=
p
.
prefixes
let
tag
p
(
ns
,
l
)
=
match
!
(
get_prefix
p
ns
)
with
if
ns
==
xml_ns
then
"xml:"
^
(
U
.
get_str
l
)
else
match
!
(
get_prefix
p
ns
)
with
|
Set
pr
->
let
pr
=
U
.
get_str
pr
in
if
pr
=
""
then
(
U
.
get_str
l
)
...
...
@@ -187,7 +191,8 @@ module Printer = struct
|
_
->
assert
false
let
attr
p
(
ns
,
l
)
=
if
ns
==
empty
then
(
U
.
get_str
l
)
if
ns
==
xml_ns
then
"xml:"
^
(
U
.
get_str
l
)
else
if
ns
==
empty
then
(
U
.
get_str
l
)
else
match
!
(
get_prefix
p
ns
)
with
|
Set
pr
->
...
...
web/index.xml
View file @
96c0902b
...
...
@@ -14,8 +14,9 @@
<pages-toc/>
</left>
<external
href=
"http://reglisse.ens.fr/cgi-bin/cduce"
title=
"Online
demo"
name=
"proto"
/>
<!--<external href="http://reglisse.ens.fr/cgi-bin/cduce" title="Online
demo" name="proto"/>-->
<external
href=
"/cgi-bin/cduce"
title=
"Online demo"
name=
"proto"
/>
<include
file=
"demo.xml"
/>
<include
file=
"download.xml"
/>
<include
file=
"bench.xml"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment