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
d37272f3
Commit
d37272f3
authored
Oct 05, 2007
by
Pietro Abate
Browse files
[r2005-02-18 17:42:19 by afrisch] import
Original author: afrisch Date: 2005-02-18 17:42:19+00:00
parent
c272c7ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
schema/schema_parser.ml
View file @
d37272f3
...
...
@@ -199,7 +199,7 @@ let schema_of_uri uri =
let
elementFormDefault
=
_is_attr
"elementFormDefault"
root
"qualified"
in
let
parse_root
root
=
let
rec
parse_root
uri
root
=
let
may_name
n
=
match
_may_attr
"name"
n
with
...
...
@@ -579,9 +579,20 @@ let schema_of_uri uri =
todo
:=
(
fun
()
->
ignore
(
resolve_model_group
name
))
::
!
todo
|
"xsd:include"
->
let
local
=
_attr
"schemaLocation"
n
in
let
new_uri
=
Url
.
local
uri
(
Utf8
.
get_str
local
)
in
print_endline
(
"Fetching "
^
new_uri
);
flush
stdout
;
ignore
(
parse_uri
new_uri
);
let
uri
=
Url
.
local
uri
(
Utf8
.
get_str
local
)
in
print_endline
(
"Include "
^
uri
);
flush
stdout
;
parse_root
uri
(
node_of_uri
uri
);
|
"xsd:import"
->
(
match
_may_attr
"schemaLocation"
n
with
|
None
->
print_endline
"Import ignored, no schemaLocation"
|
Some
local
->
let
new_uri
=
Url
.
local
uri
(
Utf8
.
get_str
local
)
in
print_endline
(
"Import "
^
new_uri
);
flush
stdout
;
ignore
(
parse_uri
new_uri
)
)
(* TODO: check namespace *)
|
"xsd:annotation"
->
()
|
s
->
print_endline
(
"Ignore Schema element "
^
s
);
in
_iter_elems
root
register
;
...
...
@@ -589,7 +600,7 @@ let schema_of_uri uri =
(* end of parse_root *)
in
parse_root
root
;
parse_root
uri
root
;
targetNamespace
(* end of parse_uri *)
...
...
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