Skip to content
This repository has been archived by the owner on Sep 3, 2020. It is now read-only.

Commit

Permalink
Switched to using the xqueryparser.xq parser.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpcs committed Mar 2, 2012
1 parent 670c118 commit 8179b89
Show file tree
Hide file tree
Showing 6 changed files with 411 additions and 29 deletions.
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -186,6 +186,9 @@ Thanks to [Darin McBeath](http://xqdoc.org/history.html) for creating
the original xqDoc, which xquerydoc borrows heavily. xqDoc is released under the
Apache License, Version 2.0

The [XQuery parser](https://github.com/jpcs/xqueryparser.xq) itself is now a
separate library under Apache License, Version 2.

XQuery parsers were generated from EBNF using Gunther Rademacher's
excellent http://www.bottlecaps.de/rex/

Expand Down
4 changes: 2 additions & 2 deletions src/lib/html-module.xsl
Expand Up @@ -131,8 +131,8 @@ version="2.0">
<xsl:template match="doc:variable[@private]"/>

<xsl:template match="doc:variable">
<div id="{ concat('var_', replace(doc:uri, ':', '_')) }">
<h4><pre class="prettyprint lang-xq"><u>Variable</u>:&#160;$<xsl:value-of select="doc:uri"/> as <xsl:value-of select="doc:type"/><xsl:value-of select="doc:type/@occurrence"/></pre></h4>
<div id="{ concat('var_', replace(doc:name, ':', '_')) }">
<h4><pre class="prettyprint lang-xq"><u>Variable</u>:&#160;$<xsl:value-of select="doc:name"/> as <xsl:value-of select="doc:type"/><xsl:value-of select="doc:type/@occurrence"/></pre></h4>
<xsl:apply-templates select="doc:comment"/>
</div>
</xsl:template>
Expand Down
6 changes: 3 additions & 3 deletions src/lib/markdown-module.xsl
Expand Up @@ -63,10 +63,10 @@ version="2.0">

<xsl:template match="doc:variable">
<xsl:text>
### &lt;a name="</xsl:text><xsl:sequence select="concat('var_', replace(doc:uri, ':', '_'))"/><xsl:text>"/&gt; $</xsl:text><xsl:value-of select="doc:uri"/><xsl:text>
### &lt;a name="</xsl:text><xsl:sequence select="concat('var_', replace(doc:name, ':', '_'))"/><xsl:text>"/&gt; $</xsl:text><xsl:value-of select="doc:name"/><xsl:text>
</xsl:text>
<xsl:text>```xquery
$</xsl:text><xsl:value-of select="doc:uri"/><xsl:text> as </xsl:text><xsl:value-of select="doc:escape(doc:type)"/><xsl:value-of select="doc:escape(doc:type/@occurrence)"/><xsl:text>
$</xsl:text><xsl:value-of select="doc:name"/><xsl:text> as </xsl:text><xsl:value-of select="doc:escape(doc:type)"/><xsl:value-of select="doc:escape(doc:type/@occurrence)"/><xsl:text>
```
</xsl:text>
<xsl:apply-templates select="doc:comment"/>
Expand Down Expand Up @@ -262,7 +262,7 @@ Version: </xsl:text><xsl:value-of select="doc:escape(.)"/>
* Variables: </xsl:text>
<xsl:for-each select="doc:variable[not(@private)]">
<xsl:if test="position() ne 1"><xsl:text>, </xsl:text></xsl:if>
<xsl:text>[$</xsl:text><xsl:value-of select="doc:uri"/><xsl:text>](#</xsl:text><xsl:sequence select="concat('var_', replace(doc:uri, ':', '_'))"/><xsl:text>)</xsl:text>
<xsl:text>[$</xsl:text><xsl:value-of select="doc:name"/><xsl:text>](#</xsl:text><xsl:sequence select="concat('var_', replace(doc:name, ':', '_'))"/><xsl:text>)</xsl:text>
</xsl:for-each>
</xsl:template>

Expand Down
2 changes: 1 addition & 1 deletion src/xquery/parsers/XQueryML30.xq
Expand Up @@ -1882,7 +1882,7 @@ declare function p:transition($input as xs:string,
$end as xs:integer,
$result as xs:integer,
$current-state as xs:integer,
$previous-state as xs:integer) as xs:integer+
$previous-state as xs:integer)
{
if ($current-state = 0) then
let $result := $result idiv 2048
Expand Down

0 comments on commit 8179b89

Please sign in to comment.