forked from SWI-Prolog/packages-sgml
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Attribute qualification in XML mode
- Loading branch information
Jan Wielemaker
committed
Sep 16, 2002
1 parent
87dc60d
commit 118ad21
Showing
7 changed files
with
58 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
<!DOCTYPE shref [ | ||
<!ELEMENT shref - - (netc|twit)*> | ||
<!ELEMENT shref - - (netc|twit|twat)*> | ||
<!ELEMENT netc - - (frob+)> | ||
<!ELEMENT frob O O (twit)> | ||
<!ELEMENT twit - O (#PCDATA)> | ||
<!ELEMENT twat - - CDATA> | ||
]> | ||
<shref> | ||
<netc/<frob><twit>This slash should end netc:/ | ||
<twat/This is a twat/ | ||
<twit/This is a simple shortref/ | ||
</shref> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[element(shref, [], [element(netc, [], [element(frob, [], [element(twit, [], ['This slash should end netc:'])])]), element(twit, [], ['This is a simple shortref'])])]. | ||
[element(shref, [], [element(netc, [], [element(frob, [], [element(twit, [], ['This slash should end netc:'])])]), element(twat, [], ['This is a twat']), element(twit, [], ['This is a simple shortref'])])]. | ||
[]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
<center> | ||
|
||
<h1>SWI-Prolog SGML/XML parser<br> | ||
<font size="+0"><em>Version 1.0.14, March 2001</em></font></h1> | ||
<font size="+0"><em>Version 1.0.15, September 2002</em></font></h1> | ||
|
||
<br> | ||
<a href="mailto:[email protected]"><em>Jan Wielemaker</em></a><br> | ||
|
@@ -823,7 +823,7 @@ <h2><a name="sec:sec-3.4">DTD-Handling</a></h2> | |
|
||
<dt> <br> | ||
<b>notation(<var>Name, Decl</var>)</b><dd> | ||
Unify <var>Decl</var> with a list if <code>system(+File)</code> and/or | ||
Unify <var>Decl</var> with a list if <code>system(+File)</code> andor | ||
<code>public(+PublicId)</code>. | ||
</dl> | ||
</dl> | ||
|
@@ -962,10 +962,20 @@ <h2><a name="sec:sec-3.6">Parsing Primitives</a></h2> | |
<dt> <br> | ||
<b><a name="const:xmlns%5"><b><tt>xmlns</tt></b></a></b><dd> | ||
Process file as XML file with namespace support. See <a href="#sec:xmlns">xmlns</a> for | ||
details. | ||
details. See also the <code>qualify_attributes</code> option below. | ||
</dl> | ||
|
||
|
||
<dt> <br> | ||
<b>qualify_attributes(<var>Boolean</var>)</b><dd> | ||
How to handle unqualified attribute (i.e. without an explicit namespace) | ||
in XML namespace (<a name="const:xmlns%6"><b><tt>xmlns</tt></b></a>) mode. Default and standard compliant | ||
is not to qualify such elements. If <a name="const:true%2"><b><tt>true</tt></b></a>, such attributes are qualified | ||
with the namespace of the element they appear in. This option is for | ||
backward compatibility as this is the behaviour of older versions. In | ||
addition, the namespace document suggests unqualified attributes are | ||
often interpreted in the namespace of their element. | ||
|
||
<dt> <br> | ||
<b>space(<var>SpaceMode</var>)</b><dd> | ||
Define the initial handling of white-space in PCDATA. This attribute is | ||
|
@@ -1024,7 +1034,7 @@ <h2><a name="sec:sec-3.6">Parsing Primitives</a></h2> | |
|
||
<dt> <br> | ||
<b>dialect(<var>-Dialect</var>)</b><dd> | ||
Return the current dialect used by the parser (<a name="const:sgml%5"><b><tt>sgml</tt></b></a>, <a name="const:xml%4"><b><tt>xml</tt></b></a> or <a name="const:xmlns%6"><b><tt>xmlns</tt></b></a>). | ||
Return the current dialect used by the parser (<a name="const:sgml%5"><b><tt>sgml</tt></b></a>, <a name="const:xml%4"><b><tt>xml</tt></b></a> or <a name="const:xmlns%7"><b><tt>xmlns</tt></b></a>). | ||
|
||
|
||
<dt> <br> | ||
|
@@ -1278,14 +1288,14 @@ <h2><a name="sec:sec-3.6">Parsing Primitives</a></h2> | |
|
||
<dt> <br> | ||
<b>xmlns</b><dd> | ||
When parsing an in <a name="const:xmlns%7"><b><tt>xmlns</tt></b></a> mode, a new namespace declaraction is | ||
When parsing an in <a name="const:xmlns%8"><b><tt>xmlns</tt></b></a> mode, a new namespace declaraction is | ||
pushed on the environment. The named handler is called with three | ||
arguments: <code><var>Handler</var>(+NameSpace, +URL, +Parser)</code>. | ||
See <a href="#sec:xmlns">xmlns</a> for details. | ||
|
||
<dt> <br> | ||
<b>urlns</b><dd> | ||
When parsing an in <a name="const:xmlns%8"><b><tt>xmlns</tt></b></a> mode, this predicate can be used to map a | ||
When parsing an in <a name="const:xmlns%9"><b><tt>xmlns</tt></b></a> mode, this predicate can be used to map a | ||
url into either a canonical URL for this namespace or another internal | ||
identifier. See <a href="#sec:xmlns">xmlns</a> for details. | ||
</dl> | ||
|
@@ -1761,13 +1771,13 @@ <h1>Index</h1> | |
<li><a href="#const:shorttag"><b><tt>shorttag</tt></b></a> | ||
<li><a href="#const:start"><b><tt>start</tt></b></a> | ||
<li><a href="#const:token"><b><tt>token</tt></b></a> [ <a href="#const:token%2">2</a>] | ||
<li><a href="#const:true"><b><tt>true</tt></b></a> | ||
<li><a href="#const:true"><b><tt>true</tt></b></a> [ <a href="#const:true%2">2</a>] | ||
<li><a href="#const:urlns"><b><tt>urlns</tt></b></a> | ||
<li><a href="#const:warning"><b><tt>warning</tt></b></a> | ||
<li><a href="#const:xml"><b><tt>xml</tt></b></a> [ <a href="#const:xml%2">2</a> <a href="#const:xml%3">3</a> <a href="#const:xml%4">4</a>] | ||
<li><a href="#xml_quote_attribute/2"><b>xml_quote_attribute/2</b></a> | ||
<li><a href="#xml_quote_cdata/2"><b>xml_quote_cdata/2</b></a> | ||
<li><a href="#const:xmlns"><b><tt>xmlns</tt></b></a> [ <a href="#const:xmlns%2">2</a> <a href="#const:xmlns%3">3</a> <a href="#const:xmlns%4">4</a> <a href="#const:xmlns%5">5</a> <a href="#const:xmlns%6">6</a> <a href="#const:xmlns%7">7</a> <a href="#const:xmlns%8">8</a>] | ||
<li><a href="#const:xmlns"><b><tt>xmlns</tt></b></a> [ <a href="#const:xmlns%2">2</a> <a href="#const:xmlns%3">3</a> <a href="#const:xmlns%4">4</a> <a href="#const:xmlns%5">5</a> <a href="#const:xmlns%6">6</a> <a href="#const:xmlns%7">7</a> <a href="#const:xmlns%8">8</a> <a href="#const:xmlns%9">9</a>] | ||
</ul> | ||
</body> | ||
</html> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters