<?xml version='1.0'?>
<?xml:stylesheet type='text/xsl' href='issues.xsl'?>
<issues version="$Id: issues2.xml,v 1.7 2002/11/14 14:38:54 Bear Exp $">

<header>
<p>
	This issue list is for the second phase of the RELAX NG development.
</p>
</header>

<categoryDecl id="compactSyntax" title="Compact syntax" />


<issue
	category="compactSyntax"
	keyword="charEscape"
	originator="John Cowan (?)"
	status="closed">
	<title>C-like (or XML-like?) character escape.</title>
	<description>
		<p>
			To allow writing a schema that describes non-ASCII element/attribute names with an editor that doesn't support them, we might want to have character escapes in the compact syntax, just like Java or XML.
		</p><p>
			Such escapes are also useful for parameter names and their values.
		</p>
	</description>
	<proposal>
		<p>
			<maillink href="200204/msg00017.html">a post</maillink> from James Clark
			proposes <code>\u{XXXX}</code>. He also proposes <code>\x{XXXX}</code>, which is the syntax used by Perl. The TC seems to prefer \x over \u.
		</p>
	</proposal>
	<resolution>
		<p>
			(2002/4/25) TC has adopted <code>\x{XXXX}</code> as the character entity. It works like Java Unicode escapes;  they are processed after the newline normalization has done, but before the compact schema is parsed.
		</p>
	</resolution>
</issue>



<issue
	category="compactSyntax"
	keyword="exceptSyntax"
	originator="James Clark"
	status="closed">
	<title>Syntax of the "except" clause</title>
	<description>
		<p>
			In the current draft, <code>nc1 '-' nc2</code> is used to represent the "except" clause. However, to increase the readability, it was suggested that we should use the keyword "except" instead of a dash.
		</p>
	</description>
	<proposal>
		<p>
			The proposed syntax for the except clause is <code>nc1 "except" nc2</code>
		</p>
	</proposal>
	<resolution>
		<p>
			The editor believes this issue has closed with no action.
		</p>
	</resolution>
</issue>



<issue
	category="compactSyntax"
	keyword="encodingDeclaration"
	originator="James Clark (?)"
	status="closed">
	<title>Encoding declaration inside the compact syntax</title>
	<description>
		<p>
			The current draft doesn't have any mechanism to specify the encoding of a RELAX NG grammar writtein in the compact syntax. Therefore, it must be specified as out-of-band information (such as a parameter to the command line.)
		</p><p>
			To avoid this inconvenience, it was suggested to add something like the XML declaration to the header.
		</p>
	</description>
	<proposal>
		<p>
			John Cowan proposed <code>encoding 'encodingname'</code>.
		</p><p>
			James Clark also proposed a bunch of solutions (<maillink href="/200204/msg00027.html">see his post</maillink>). In particular, one of the proposals was <code>!rnc encoding="iso-8859-1"</code>.
		</p>
	</proposal>
	<resolution>
		<p>
			(2002/04/25) TC has decided NOT to have an encoding declaration inside the compact syntax. The processor will always assume that schemas are written in UTF-8/16 (BOM will be used to distinguish them.)
		</p>
	</resolution>
</issue>



<issue
	category="compactSyntax"
	keyword="comment and a:documentation"
	originator="John Cowan (?)"
	status="closed">
	<title>Mapping comments and &lt;a:documentation></title>
	<description>
		<p>
			It was suggested that it would be nice if the compact syntax specifies the mapping between comments in the compact syntax and &lt;a:documentation> in the XML syntax. In this way, comments in the compact syntax would be automatically copied into XML syntax as &lt;a:documentation> element.
		</p>
	</description>
	<proposal>
		<p>
			The proposal was only to map comments starting with "##", whereas any line that starts with single "#" is treated as a comment (this behavior is somewhat like Javadoc)
		</p><p>
			Mapping was not proposed yet.
		</p>
	</proposal>
	<resolution>
		(2002/04/25) "##" to &lt;a:documentation> is adopted. See <maillink href="200204/msg00075.html">the original post</maillink> for the semantics. For writing comments to the implicit grammar, we require the author to make it explicit.
	</resolution>
</issue>



<issue
	category="compactSyntax"
	keyword="div"
	originator="James Clark"
	status="closed">
	<title>Equivalent of &lt;div></title>
	<description>
		<p>
			The compact syntax doesn't have the equivalent of &lt;div> in the XML syntax.
		</p>
	</description>
	<proposal>
		<p>
			The current proposal is:
		</p>
<pre>
[ ... annotation ... ]
{
  ... pattern ...
}</pre>
		<p>
			The annotation can be empty.
		</p>
	</proposal>
	<resolution>
		<p>
			(2002/04/25) The following syntax was adopted. The annotation is optional.
		</p>
		<pre>
[ ... annotation ... ]
div {
  ... pattern ...
}</pre>
	</resolution>
</issue>


<issue
	category="compactSyntax"
	keyword="nsDecl"
	originator="James Clark"
	status="closed">
	<title>local namespace declaration</title>
	<description>
		<p>
			The current syntax doesn't allow namespace&lt;->prefix bindings to be declared locally. This prevents some grammars written in XML from being converted into a compact syntax (see below.)
		</p>
<pre><![CDATA[
<element name="root">
  <element name="x:child" xmlns:x="urn:x1"/>
  <element name="x:child" xmlns:x="urn:x2"/>
</element>
]]></pre>
	</description>
	<proposal>
	<olist>
		<item>
			Live with it.  Schemas in the XML syntax that use prefixes inconsistently
may not be translatable into the non-XML syntax. (jjc)
		</item>
		<item>
			A proposal from James Clark:
			<pre>
local {
  namespace <i>prefix</i> = "<i>namespace URI</i>"
  ...
  
  <i>body</i>
}</pre>
		</item>
		<item>
			A proposal from John Cowan:
			<pre>
local <i>prefix</i> = "<i>namespace URI</i>" ... {
  <i>body</i>
}</pre>
		</item>
		<item>
			XML-like syntax that makes use of annotation (from James Clark):
			<pre>
[xmlns:<i>prefix</i>="<i>namespace URI</i>"]
<i>pattern</i>
			</pre>
		</item>
	</olist>
	<p>
		One of the difficulties of this issue is to allow namespace declarations to
		affect both annotations and RELAX NG constructs in an intuitive way.
	</p>
	</proposal>
	<resolution>
		(2002/06/06) This issue is closed with no action, based on the input that none of the proposed syntax works very well.
	</resolution>
</issue>



<issue
	category="compactSyntax"
	keyword="longStrLiteral"
	originator="James Clark"
	status="closed">
	<title>long string literal</title>
	<description>
		<p>
			It might be nice if the compact syntax allows users to write a long string literal (such as a complex regular expression) in multiple lines, just like in C.
		</p>
	</description>
	<proposal>
		<olist>
			<item>
				Use an infix operator to indicate string concatenation. '+' and '^' are proposed. '^' seems to enjoy wider support because '+' is overlapping with oneOrMore.
			</item>
			<item>
				Mere concatenation, just like C. With a possibility of prohibiting the use of doubling (such as "" and '' to represent " and ')
			</item>
		</olist>
	</proposal>
	<resolution>
		<p>
			(2002/04/25) Adjacent string literals will be automatically concatanated. Thus <code>"AA" 'BB'</code> will be treated as <code>"AABB"</code>. Wherever you can write a string literal, you can have this automatic concatanation semantics. String concatanation always takes precedence to two independent string literals happened to be adjacent. Thus the following schema
		</p>
<pre><![CDATA[
<value xmlns:p="abc">def</value>
]]></pre>
		<p>
			might be casually transformed to
		</p>
		<pre>
ns p = "abc"
"def"
		</pre>
		<p>
			But this is processed as:
		</p>
		<pre>
ns p = "abcdef"
		</pre>
	</resolution>
</issue>



<issue
	category="compactSyntax"
	keyword="newlineInStr"
	originator="James Clark"
	status="closed">
	<title>newlines in string</title>
	<description>
		<p>
			The syntax currently allows newlines inside strings.
			Do we want to prohibit them?
		</p>
	</description>
	<proposal>
		<p>
			See <maillink href="200204/msg00040.html">a post</maillink> from James Clark.
			Most of the programming languages (such as C and Java) prohibit them.
			If we are to prohibit them, users will need to use the character escape
			<code>\x{A}</code>.
		</p>
	</proposal>
	<resolution>
		<p>
			(2002/04/25) TC has decided to allow newlines inside string literals,
			mainly because of the way we handle character escapes.
		</p><p>
			(2002/06/20) TC has re-opened this issue, based on a feedback (from John Cowan I believe) that we could use Python-like <code>"""string"""</code> and <code>'''string'''</code> syntax for string literals.
		</p><p>
			TC has voted and agreed to allow new lines in this triple-quoted strings. At the same time, TC has adopted to this allow literal new lines in normal strings (<code>"string"</code> and <code>'string'</code>) but allow character escapes that represent new lines (such as <code>\x{A}</code>.)
		</p>
		<p>
			To summarize, these are allowed:
		</p>
<pre>
"""abc
def
ghi"""

'''abc def ghi \x{D}\x{A}'''

"hello world\x{D}\x{A}"

'hello world\x{D}\x{A}'
</pre>
		<p>
			But these are not allowed:
		</p>
<pre>
"Can
you hear me?"

'How about
now?'
</pre>
	</resolution>
</issue>




<issue
	category="compactSyntax"
	keyword="mixAndMatch"
	originator="Makoto Murata"
	status="closed">
	<title>Mixing the compact syntax and the XML syntax</title>
	<description>
		<p>
			Do we allow a schema written in the XML syntax to <code>include</code> or <code>externalRef</code> another schema written in the compact syntax (or vice versa)?
		</p>
	</description>
	<resolution>
		<p>
			(2002/04/25) TC has decided not to allow this. One of the concerns was the added complexity to the implementation. Of course, we can allow this later if we want.
		</p>
	</resolution>
</issue>




<issue
	category="compactSyntax"
	keyword="XSDdefaultBinding"
	originator="James Clark"
	status="closed">
	<title>Declaring the prefix "xsd" for XML Schema datatypes</title>
	<description>
		<p>
			W3C XML Schema Datatypes are practically only one interoperable datatype library. And many people are using it with RELAX NG.
		</p><p>
			To make a life relaxing for those majority, do we want to pre-declare the prefix "xsd" for "http://www.w3.org/2001/XMLSchema-datatypes"?
		</p>
	</description>
	<resolution>
		<p>
			(2002/05/09) TC has decided to declare this binding by default. This would free users from remembering a long namespace URI. A user who wishes to use this prefix for other namespace URIs can always override this default by declaring the prefix mapping explicitly.
		</p>
	</resolution>
</issue>




<issue
	category="compactSyntax"
	keyword="externalRef"
	originator="John Cowan"
	status="closed">
	<title>Keyword Change for "externalRef" and "notAllowed"</title>
	<description>
		<p>
			John Cowan suggested that the keyword "externalRef" should be changed to "external" just like the keyword of &lt;parentRef/> is "parent".
		</p><p>
			This leaves "notAllowed" as the only camel notation keyword, which leads to another issue of whether we should also change this keyword to completely get rid of camel notation keywords.
		</p>
	</description>
	<proposal>
		<p>
			A number of alternative keywords were suggested for "notAllowed", including but not limited to "!","fordbidden","disallowed","invalid", and "ilegal".
		</p>
	</proposal>
	<resolution>
		<p>
			(2002/06/25) "externalRef" is changed to "external" on the basis that all the other "xxxxRef" is written as "xxxx" in the compact syntax. "notAllowed" will remain as-is simply because no one strongly wants to change it.
		</p>
	</resolution>
</issue>








<issue
	category="compactSyntax"
	keyword="emptyAtt"
	originator="James Clark"
	status="closed">
	<title>empty attribute body</title>
	<description>
		<p>
			Shall we allow <code>attribute name {}</code> just like we allow
			&lt;attribute name="name"/>?
		</p>
	</description>
	<resolution>
		<p>
			TC agreed that the saving of four key strokes are not a big win. Based on the argument that the compact syntax is to preserve the semantics of RELAX NG, not the surface of the XML syntax, we decided not to allow this short-hand.
		</p>
	</resolution>
</issue>







<issue
	category="compactSyntax"
	keyword="quotingParameter"
	originator="James Clark"
	status="closed">
	<title>Make parameter quoting optional</title>
	<description>
		<p>
			Should we make quotes on parameter values optional when the value is an NMTOKEN:  <code>xs:string { minLength = 1 }</code>
		</p><p>
			Currently, we need to write <code>minLength="1"</code>
		</p>
	</description>
	<resolution>
		<p>
			(2002/06/20) closed with no action.
		</p>
	</resolution>
</issue>







<issue
	category="compactSyntax"
	keyword="charactersInsideAnnElem"
	originator="James Clark"
	status="closed">
	<title>Another notation for writing characters inside annotation element</title>
	<description>
		<p>
			A feedback from RelaxNGCC claims that it becomes awkward to write lengthy character data inside foreign elements in the compact syntax.
		</p><p>
			Currently, we need to quote all character data inside elements. Shall we provide another syntax to make this less painful? If so, how?
		</p>
	</description>
	<proposal>
		<p>
			James Clark proposed sh-like multi-line comments
		</p>
<pre>
&lt;&lt;KEYWORD
characters
characters
KEYWORD
</pre>
		<p>
			KEYWORD can be an arbitrary keyword. John Cowan proposed Python-like syntax:
		</p>
<pre>
Python has multi-line strings delimited by """ at each end,
as another possible syntax; unlike Perl/sh documents, these
strings are embedded directly.
</pre>
	</proposal>
	<resolution>
		<p>
			TC adopted Phyton-like <code>"""string"""</code> literals. As a result, this issue has closed with no action. See the re-opend issue 8 "newlineInStr" for more on this syntax.
		</p>
	</resolution>
</issue>








<issue
	category="compactSyntax"
	keyword="altAnnotation"
	originator="James Clark"
	status="closed">
	<title>Another annotation syntax</title>
	<description>
		<p>
			A feedback from RelaxNGCC also reveals a case where the current annotation syntax doesn't quite work well.
		</p><p>
			In a nut-shell, the compact syntax has an assumption as to the use of annotation --- it is assumed that an annotation is always attached to the parent element. But RelaxNGCC is using annotations in a different way.
		</p>
	</description>
	<proposal>
		<p>
			James Clark proposed:
		</p>
<pre>
element foo {
	cc:java [ "program()" ] >> pattern
</pre>
		<p>
			But he wrote he was not sure if the above syntax is unambiguous.
		</p><p>
			No other syntax is proposed yet.
		</p>
	</proposal>
	<resolution>
		TC has decided not to introduce this new annotation syntax.
	</resolution>
</issue>





<issue
	category="compactSyntax"
	keyword="prefixXSD"
	originator="James Clark"
	status="closed">
	<title>Pre-declaring the xsd prefix to XML Schema datatypes</title>
	<description>
		<p>
			Because of the popularity of XML Schema Datatypes as THE datatype library, it might be worthy to pre-declare the "xsd" prefix for "http://www.w3.org/2001/XMLSchema-datatypes". Users no longer need to type a datatype library declaration if s/he is going to use this library, which is highly likely.
		</p><p>
			Of course the "xsd" prefix can be overrided manually.
		</p>
	</description>
	<resolution>
		(2002/05/09) TC has decided to adopt this proposal.
	</resolution>
</issue>




<issue
	category="compactSyntax"
	keyword="emptyKeyword"
	originator="James Clark"
	status="closed">
	<title>Keyword Change for "empty"</title>
	<description>
		<p>
			James proposed that () could be used instead of empty. In fact, this is what XQuery does.
		</p>
	</description>
	<resolution>
		<p>
			(2002/06/25) TC decided to close this issue with no action.
		</p>
	</resolution>
</issue>




<issue
	category="compactSyntax"
	keyword="noAnnotation"
	originator="John Cowan"
	status="closed">
	<title>remove annotation syntax</title>
	<description>
		<p>
			John Cowan listed <maillink href="200207/msg00017.html">arguments against the annotation syntax.</maillink>
		</p>
	</description>
	<proposal>
		<p>
			Varios people suggested many ideas about possible annotation syntax, including but not limited to:
		</p>
		<ulist>
			<item>embedding XML fragments.</item>
			<item>using attribute annotation syntax only.</item>
			<item>C-like /* */ style.</item>
		</ulist>
		<p>
			Certainly this has been one of the most controversial features in the compact syntax.
		</p>
	</proposal>
	<resolution>
		<p>
			(2002/07/18) TC has decided to keep the current annotation syntax.
		</p>
	</resolution>
</issue>





<issue
	category="compactSyntax"
	keyword="trailingCombinor"
	originator="John Cowan"
	status="closed">
	<title>Allow redundant ',' '&amp;' '|'</title>
	<description>
		<p>
			John Cowan <maillink href="200207/msg00042.html">proposed</maillink> to allow these combinaors right before a right parenthesis so that a list of items can be written beautifuly (and easy to maintain.)
		</p>
<pre>
bar = element bar {
  element bar1 {text},
  element bar2 {text},
  element bar3 {text},
}
</pre>
	</description>
	<proposal>
		<p>
			Java and C allow this in certain places (e.g., array initializer.)
			But this also adds a complexity to implementations.
		</p><p>
			Allowing this redundancy in arbitrary place will require arbitrary length of look-ahead for implementations to parse the compact syntax.
		</p><p>
			One proposed workaround within the current syntax is to write this like:
		</p>
<pre>
bar = element bar {
  element bar1 {text},
  element bar2 {text},
  element bar3 {text},
  empty
}
</pre>
	</proposal>
	<resolution>
		<p>
			(2002/07/18) TC has decided to close this issue with no action.
		</p>
	</resolution>
</issue>







<issue
	category="compactSyntax"
	keyword="attributeGrammar"
	originator="MURATA Makoto"
	status="open">
	<title>Use of "attribute grammar" for formal description</title>
	<description>
		<p>
			Murata-san pointed out the lack of type information in the current notation of the <link href="http://www.oasis-open.org/committees/relax-ng/compact-20020607.html#formal">formal description</link> of the compact syntax.
		</p>
	</description>
	<proposal>
		<p>
			<maillink href="200209/msg00032.html">His proposal</maillink> is to use the notation of attribute grammar, which gives you rigorous definition at the expense of terseness. The author believes that the attribute grammar is well known in various fields of science, such as liguistics and computer science.
		</p><p>
			A comment from David Rosenborg says he likes the current spec because of its compactness.
		</p><p>
			James proposed to extend the current notation by adding type information (like return type from production rules, etc.)
		</p><p>
			(2002/11/14) TC seems to be very happy with the latest change to the spec to make type information explicit. The only one issue discussed was to capitalize the type name.
		</p>
	</proposal>
</issue>







<issue
	category="compactSyntax"
	keyword="isomorphism"
	originator="David Rosenborg"
	status="closed">
	<title>Definition of"Non-structure preserving translator"</title>
	<description>
		<p>
			In section 6.3, the wording currently reads "For this purpose, two instances of data model ... are considered loosely equivalent if they are identical after applying all the simplification ..."
		</p><p>
			But they may not be identical, because processors can choose names on &lt;define>s freely and put them in any order.
		</p>
	</description>
	<circumstance>
		<p>
			TC has agreed that this is a bug and needs to be fixed. That is, we need a clearer definition of what it means for two grammars to be equal.
		</p>
	</circumstance>
	<resolution>
		<p>
			On 2002/11/14, TC has voted to publish the working draft as the commity specification, so this issue is automatically closed.
		</p>
	</resolution>
</issue>






<issue
	category="compactSyntax"
	keyword="KeywordElemAndAtt"
	originator="Paul T"
	status="closed">
	<title>Keywords "element" and "attribute" are verbose</title>
	<description>
		<p>
			Paul and David suggested to use "@foo {...}" instead of "attribute foo {...}" and "&lt;foo> {...}" instead of "element foo {...}" to make the compact syntax even more compact.
		</p>
	</description>
	<circumstance>
		<p>
			One concern raised was that the proposed syntax breaks the symmetricity of elements and attributes. See the comments list for detailed discussion.
		</p>
	</circumstance>
	<resolution>
		<p>
			TC has decided to keep the current keywords "element" and "attribute".
		</p>
	</resolution>
</issue>





<issue
	category="compactSyntax"
	keyword="nonwellformedTranslation"
	originator="David Rosenborg"
	status="closed">
	<title>Transformation can produce not-well-formed XML documents</title>
	<description>
		<p>
			The following schema produces two document elements, which is not well-formed.
		</p>
<pre>
## Oops
"Just a value pattern"
</pre>
	</description>
	<circumstance>
		<p>
			James proposed to add a new constraint to the topLevelBody production and limit the result to have a single top-level element.
		</p>
	</circumstance>
	<resolution>
		<p>
			As proposed, a restriction is put in place of the topLevelBody production.
		</p>
	</resolution>
</issue>





<issue
	category="compactSyntax"
	keyword="multiplePounds"
	originator="David Rosenborg"
	status="closed">
	<title>blocks like ##### produces unexpected documentation element </title>
	<description>
		<p>
			People often use #################### as a formatting aid (for example to separate sections.) According to the current draft, this will be also transformed into a documentation element (except the first two ##).
		</p>
	</description>
	<circumstance>
		<p>
			John Cowan proposed to change the doc comment marker from "##" to "##+" (in regexp notation), thereby treating the entire block as the marker.
		</p><p>
			Another option is to treat it as a doc comment only when ## is not followed by another #. Or yet another option is just to leave things as is.
		</p><p>
			TC seems to prefer "##+".
		</p>
	</circumstance>
	<resolution>
		<p>
			##+ was chosen.
		</p>
	</resolution>
</issue>





<issue
	category="compactSyntax"
	keyword="stringConcatanation"
	originator="David Rosenborg"
	status="closed">
	<title>Annotation element with both attributes and text content</title>
	<description>
		<p>
			The current syntax cannot create an annotation element with both attributes and text content.
		</p>
<pre>
x:foo [ bar="baz" "some content" ]
</pre>
		<p>
			Because the above will not work due to literal segment concatenation.
		</p>
	</description>
	<resolution>
		<p>
			Following James' proposal, we will introduce an explicit concatanation operator '~'.
			So
		</p>
<pre>
x:foo [ bar="baz" "some content" ]
</pre>
		<p>
			and
		</p>
<pre>
x:foo [ bar="baz" ~ "some content" ]
</pre>
		<p>
			are different
		</p>
	</resolution>
</issue>




<issue
	category="compactSyntax"
	keyword="twoAnnotations"
	originator="Mike"
	status="open">
	<title>Two different annotations in section 5</title>
	<description>
		<p>
			Annotation elements (foreign namespace elements) and RELAX NG DTD compatibility annotation
			are both refered to by the word "annotation".
		</p>
	</description>
	<proposal>
		<p>
			Add introduction to the beginning of section 5 to clarify this.
		</p>
	</proposal>
</issue>


</issues>