forked from memcached/memcached
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rearrange the binary protocol docs and xml2rfc tools.
git-svn-id: http://code.sixapart.com/svn/memcached/branches/binary@776 b0b603af-a30f-0410-a34e-baf09ae79d0b
- Loading branch information
Aaron Stone
committed
Apr 27, 2008
1 parent
f1351f9
commit f5e4d26
Showing
12 changed files
with
748 additions
and
67 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
%.txt: %.full | ||
xml2rfc $< $@ | ||
|
||
%.chk: %.xml xml2rfc/rfc2629-refchk.xsl | ||
xsltproc xml2rfc/rfc2629-refchk.xsl $< >$@ | ||
|
||
%.full: %.xml xml2rfc/rfc2629-noinc.xsl | ||
xsltproc xml2rfc/rfc2629-noinc.xsl $< >$@ |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
|
||
<reference anchor='RFC0768'> | ||
|
||
<front> | ||
<title>User Datagram Protocol</title> | ||
<author initials='J.' surname='Postel' fullname='J. Postel'> | ||
<organization>University of Southern California (USC)/Information Sciences Institute</organization> | ||
<address> | ||
<postal> | ||
<street>4676 Admiralty Way</street> | ||
<city>Marina del Rey</city> | ||
<region>CA</region> | ||
<code>90291</code> | ||
<country>US</country></postal> | ||
<phone>+1 213 822 1511</phone></address></author> | ||
<date year='1980' day='28' month='August' /></front> | ||
|
||
<seriesInfo name='STD' value='6' /> | ||
<seriesInfo name='RFC' value='768' /> | ||
<format type='TXT' octets='5896' target='ftp://ftp.isi.edu/in-notes/rfc768.txt' /> | ||
</reference> |
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 |
---|---|---|
@@ -0,0 +1,106 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
version="1.0"> | ||
|
||
<xsl:output method="xml"/> | ||
|
||
<xsl:template name='noinc'> | ||
<xsl:apply-templates mode='noinc'/> | ||
</xsl:template> | ||
|
||
<xsl:template match="*" mode='noinc'> | ||
<xsl:copy> | ||
<xsl:apply-templates select='@*' mode='noinc'/> | ||
<xsl:apply-templates mode='noinc'/> | ||
</xsl:copy> | ||
</xsl:template> | ||
<xsl:template match='@*' mode='noinc'> | ||
<xsl:attribute name='{name()}'> | ||
<xsl:value-of select='.'/> | ||
</xsl:attribute> | ||
</xsl:template> | ||
|
||
<xsl:template match='processing-instruction("rfc")' mode='noinc'> | ||
<xsl:choose> | ||
<xsl:when test='substring-before(.,"=") = "include"'> | ||
<xsl:call-template name='include-pi'> | ||
<xsl:with-param name='include-href'> | ||
<xsl:value-of select="translate( substring-after( ., '=' ), '" ', '' )"/><xsl:text>.xml</xsl:text> | ||
</xsl:with-param> | ||
</xsl:call-template> | ||
</xsl:when> | ||
<xsl:otherwise> | ||
<xsl:copy-of select='.'/> | ||
</xsl:otherwise> | ||
</xsl:choose> | ||
</xsl:template> | ||
|
||
<xsl:template name='include-pi'> | ||
<xsl:param name='include-href'/> | ||
<xsl:apply-templates select="document( $include-href )" mode='noinc'/> | ||
</xsl:template> | ||
|
||
<xsl:template match='dwdrfc-ref' mode='noinc'> | ||
<xsl:param name='include-href'> | ||
<xsl:choose> | ||
<xsl:when test='starts-with( @src, "http://" )'> | ||
<xsl:value-of select='@src'/> | ||
</xsl:when> | ||
<xsl:otherwise> | ||
<xsl:text>http://xml.resource.org/public/rfc/</xsl:text> | ||
<xsl:value-of select='@src'/> | ||
<xsl:text>.xml</xsl:text> | ||
</xsl:otherwise> | ||
</xsl:choose> | ||
</xsl:param> | ||
<reference anchor="{@anchor}"> | ||
<xsl:apply-templates select="document( $include-href )" mode="refrename"/> | ||
</reference> | ||
</xsl:template> | ||
|
||
<xsl:template match='*' mode='refrename'> | ||
<xsl:apply-templates mode='refrename'/> | ||
</xsl:template> | ||
|
||
<xsl:template match='reference' mode='refrename'> | ||
<xsl:apply-templates mode='noinc'/> | ||
</xsl:template> | ||
|
||
<xsl:template match='/'> | ||
<xsl:call-template name='noinc'/> | ||
</xsl:template> | ||
|
||
<xsl:template name='output'> | ||
<xsl:param name='foo'/> | ||
<xsl:copy-of select='$foo'/> | ||
<xsl:apply-templates select='$foo'/> | ||
</xsl:template> | ||
|
||
<xsl:template match='*' mode='output'> | ||
<element> | ||
<xsl:value-of select='name()'/> | ||
<xsl:apply-templates mode='output'/> | ||
</element> | ||
</xsl:template> | ||
<xsl:template match='text()' mode='output'/> | ||
|
||
<!-- Reference checking attributes stripped here. --> | ||
<xsl:template match='references' mode='noinc'> | ||
<xsl:element name='references'> | ||
<xsl:attribute name='title'> | ||
<xsl:value-of select='@title'/> | ||
</xsl:attribute> | ||
<xsl:apply-templates mode='noinc'/> | ||
</xsl:element> | ||
</xsl:template> | ||
|
||
<xsl:template match='xref' mode='noinc'> | ||
<xsl:element name='xref'> | ||
<xsl:attribute name='target'> | ||
<xsl:value-of select='@target'/> | ||
</xsl:attribute> | ||
<xsl:apply-templates mode='noinc'/> | ||
</xsl:element> | ||
</xsl:template> | ||
|
||
</xsl:stylesheet> |
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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<!-- rfc2629-other.ent | ||
|
||
Character entity set for RFC-2629 source xml documents. | ||
There is no need to invoke this directly from | ||
the source document itself; just invoke the DTD. | ||
|
||
These are unknown to (X)HTML, so any converter to these | ||
formats must either substitute these entities | ||
or invoke this file from the output file. | ||
|
||
Conversion to txt or nroff format will replace | ||
these entities by the parenthesized text. | ||
|
||
Typical invocation: | ||
<!ENTITY % rfc2629-other | ||
PUBLIC "-//IETF//ENTITIES Other for RFC 2629//EN" | ||
"http://xml.resource.org/authoring/rfc2629-other.ent"> | ||
%rfc2629-other; | ||
--> | ||
|
||
<!-- Magical --> | ||
<!-- rfc.number (automatically expanded to content | ||
of number="..." attribute | ||
of <rfc> element, or to "XXXX") --> | ||
|
||
<!-- ASCII --> | ||
<!ENTITY excl "!"><!-- U+0021 EXCLAMATION MARK ("!") --> | ||
<!ENTITY num "#"><!-- U+0023 NUMBER SIGN ("#") --> | ||
<!ENTITY dollar "$"><!-- U+0024 DOLLAR SIGN ("$") --> | ||
<!ENTITY percnt "%"><!-- U+0025 PERCENT SIGN ("%") --> | ||
<!ENTITY lpar "("><!-- U+0028 LEFT PARENTHESIS ("(") --> | ||
<!ENTITY rpar ")"><!-- U+0029 RIGHT PARENTHESIS (")") --> | ||
<!ENTITY ast "*"><!-- U+002A ASTERISK ("*") --> | ||
<!ENTITY plus "+"><!-- U+002B PLUS SIGN ("+") --> | ||
<!ENTITY comma ","><!-- U+002C COMMA (",") --> | ||
<!ENTITY hyphen "-"><!-- U+002D HYPHEN-MINUS ("-") --> | ||
<!ENTITY period "."><!-- U+002E FULL STOP (".") --> | ||
<!ENTITY sol "/"><!-- U+002F SOLIDUS ("/") --> | ||
<!ENTITY colon ":"><!-- U+003A COLON (":") --> | ||
<!ENTITY semi ";"><!-- U+003B SEMICOLON (";") --> | ||
<!ENTITY equals "="><!-- U+003D EQUALS SIGN ("=") --> | ||
<!ENTITY quest "?"><!-- U+003F QUESTION MARK ("?") --> | ||
<!ENTITY commat "@"><!-- U+0040 COMMERCIAL AT ("@") --> | ||
<!ENTITY lsqb "["><!-- U+005B LEFT SQUARE BRACKET ("[") --> | ||
<!ENTITY bsol "\"><!-- U+005C REVERSE SOLIDUS ("\\") --> | ||
<!ENTITY rsqb "]"><!-- U+005D RIGHT SQUARE BRACKET ("]") --> | ||
<!ENTITY circ "^"><!-- U+005E CIRCUMFLEX ACCENT ("^") --> | ||
<!ENTITY lowbar "_"><!-- U+005F LOW LINE ("_") --> | ||
<!ENTITY grave "`"><!-- U+0060 GRAVE ACCENT ("`") --> | ||
<!ENTITY lcub "{"><!-- U+007B LEFT CURLY BRACKET ("{") --> | ||
<!ENTITY verbar "|"><!-- U+007C VERTICAL LINE ("|") --> | ||
<!ENTITY rcub "}"><!-- U+007D RIGHT CURLY BRACKET ("}") --> | ||
|
||
<!-- Useful Unicode --> | ||
<!ENTITY Zcaron "Ž"><!-- U+017D LATIN CAPITAL LETTER Z WITH CARON ("Z") --> | ||
<!ENTITY zcaron "ž"><!-- U+017E LATIN SMALL LETTER Z WITH CARON ("z") --> | ||
<!ENTITY dash "‐"><!-- U+2010 HYPHEN ("-") --> | ||
<!ENTITY nbhy "‑"><!-- U+2011 NON-BREAKING HYPHEN (special "-") --> | ||
<!ENTITY wj "⁠"><!-- U+2060 WORD JOINER (special "") --> | ||
|
||
<!-- EOF --> |
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 |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
version="1.0"> | ||
|
||
<xsl:output method="xml"/> | ||
|
||
<xsl:template match='/'> | ||
<refcheck> | ||
<xsl:apply-templates select='//xref' mode='missing'/> | ||
<xsl:apply-templates select='//reference' mode='orphans'/> | ||
<xsl:apply-templates select='//references[@dwdrfc-type = "norm"]' mode='normcheck'/> | ||
<xsl:apply-templates select='//xref[@dwdrfc-type = "norm"]' mode='normrefs'/> | ||
</refcheck> | ||
</xsl:template> | ||
|
||
<xsl:template match='xref' mode='missing'> | ||
<xsl:param name='refname'> | ||
<xsl:value-of select='@target'/> | ||
</xsl:param> | ||
<xsl:param name='reftgt'> | ||
<xsl:value-of select='//*[@anchor = $refname]/@anchor'/> | ||
</xsl:param> | ||
<xsl:choose> | ||
<xsl:when test='$reftgt = $refname'/> | ||
<xsl:otherwise> | ||
<missing><xsl:value-of select='$refname'/></missing><xsl:text> | ||
</xsl:text> | ||
</xsl:otherwise> | ||
</xsl:choose> | ||
</xsl:template> | ||
|
||
<xsl:template match='xref' mode='normrefs'> | ||
<xsl:param name='refname'> | ||
<xsl:value-of select='@target'/> | ||
</xsl:param> | ||
<xsl:param name='reftgt'> | ||
<xsl:value-of select='//references[@dwdrfc-type = "norm"]/*[@anchor = $refname]/@anchor'/> | ||
</xsl:param> | ||
<xsl:choose> | ||
<xsl:when test='$reftgt = $refname'/> | ||
<xsl:otherwise> | ||
<missing-norm><xsl:value-of select='$refname'/></missing-norm><xsl:text> | ||
</xsl:text> | ||
</xsl:otherwise> | ||
</xsl:choose> | ||
</xsl:template> | ||
|
||
<xsl:template match='reference' mode='orphans'> | ||
<xsl:param name='refname'> | ||
<xsl:value-of select='@anchor'/> | ||
</xsl:param> | ||
<xsl:param name='reftgt'> | ||
<xsl:value-of select='//xref[@target = $refname]/@target'/> | ||
</xsl:param> | ||
<xsl:if test='$reftgt != $refname'> | ||
<orphan><xsl:value-of select='$refname'/></orphan><xsl:text> | ||
</xsl:text> | ||
</xsl:if> | ||
</xsl:template> | ||
|
||
<xsl:template match='references' mode='normcheck'> | ||
<xsl:apply-templates mode='normcheck'/> | ||
</xsl:template> | ||
|
||
<xsl:template match='*' mode='normcheck'> | ||
<!-- Need to find at least one normative reference --> | ||
<xsl:param name='refname'> | ||
<xsl:value-of select='@anchor'/> | ||
</xsl:param> | ||
<xsl:param name='reftgt'> | ||
<xsl:value-of select='//xref[@dwdrfc-type = "norm" and @target = $refname]/@target'/> | ||
</xsl:param> | ||
<xsl:if test='$refname != $reftgt'> | ||
<normchk><xsl:value-of select='$refname'/></normchk><xsl:text> | ||
</xsl:text> | ||
</xsl:if> | ||
</xsl:template> | ||
|
||
<xsl:template match='text()' mode='normcheck'/> | ||
|
||
</xsl:stylesheet> |
Oops, something went wrong.