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
b480a9dd
Commit
b480a9dd
authored
Oct 05, 2007
by
Pietro Abate
Browse files
[r2006-08-31 11:27:44 by afrisch] Empty log message
Original author: afrisch Date: 2006-08-31 11:27:44+00:00
parent
97bce0ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
web/manual/namespaces.xml
View file @
b480a9dd
...
...
@@ -73,7 +73,7 @@ let x = <p:a q:c="3">[]
<p>
Similarly, CDuce supports namespace
<i>
defaulting
</i>
. This is introduced
by a local or global
<code>
namespace "..."
</code>
construction.
As in the XML, default namespace appl
ies
only to tags (atoms), not
As in the XML, default namespace
s
appl
y
only to tags (atoms), not
attributes (record labels).
For instance, in the expression
<code>
namespace "A" in
<
x
y="3">[]
</code>
, the namespace for the element tag is "A", and
...
...
@@ -81,7 +81,7 @@ the attribute has no namespace.
</p>
<p>
The toplevel directive
<code>
#env
</code>
causes CDuce to print, among
The toplevel directive
<code>
#env
</code>
causes CDuce to print, among
st
others, the current set of global bindings.
</p>
...
...
@@ -253,7 +253,7 @@ will re-use the same names <code>ns1, ns2</code>, ...
<box
title=
"Pretty-printing of XML values and types"
link=
"pretty"
>
<p>
The CDuce interpreter and toplevel use
s
an algorithm similar
The CDuce interpreter and toplevel use an algorithm similar
to the one mentioned in the previous section to pretty-print
CDuce values and types that involve namespace.
</p>
...
...
@@ -267,7 +267,7 @@ been allocated, it is not re-used for another namespace.
The toplevel directive
<code>
#env
</code>
causes CDuce to print, amongst
other, the table of prefixes used for pretty-printing.
It is possible to reinitialize this table with the directive
<code>
#reinit_ns
</code>
. This directive also set
<code>
#reinit_ns
</code>
. This directive also set
s
the current set if prefix bindings as a primary source of
hints for assigning prefixes for pretty-printing in the future.
</p>
...
...
@@ -280,7 +280,7 @@ hints for assigning prefixes for pretty-printing in the future.
CDuce encourages a processing model where namespace prefixes
are just considered as macros (for namespaces) which are
resolved by the (CDuce or XML) parser. However, some
XML specifications require
s
the application to keep for each
XML specifications require the application to keep for each
XML element the set of locally visible bindings from prefixes
to namespaces. CDuce provides some support for that.
</p>
...
...
@@ -288,7 +288,7 @@ to namespaces. CDuce provides some support for that.
<p>
Even if this is not reflected in the type system, CDuce can optionally
attach to any XML element a table of namespace bindings.
The following built-in functions allow
s
the programmer to explictly
The following built-in functions allow the programmer to explictly
access this information:
</p>
<sample>
...
...
@@ -317,7 +317,7 @@ namespace on in %%e%%
The XML elements built within
<code>
%%e%%
</code>
(including by calling
<code>
load_xml
</code>
) will be annotated. There is a similar
<code>
namespace off
</code>
construction to turn off this mecanism
in a sub-expression, and both
e
constructions can be used at top-level.
in a sub-expression, and both constructions can be used at top-level.
</p>
<sample>
<![CDATA[
...
...
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