mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 20:30:28 +02:00
begin rewriting SXML docs
* doc/ref/sxml.texi (SXML): Reorder and begin rewriting. Fix formatting throughout, provide a new introduction, and the beginning of proper SSAX documentation. * doc/ref/sxml-match.texi: * doc/ref/texinfo.texi: * doc/ref/web.texi: Update references to new node names.
This commit is contained in:
parent
2b6fcf5b1f
commit
3e31e75a46
4 changed files with 585 additions and 532 deletions
|
@ -1,6 +1,6 @@
|
||||||
@c -*-texinfo-*-
|
@c -*-texinfo-*-
|
||||||
@c This is part of the GNU Guile Reference Manual.
|
@c This is part of the GNU Guile Reference Manual.
|
||||||
@c Copyright (C) 2010 Free Software Foundation, Inc.
|
@c Copyright (C) 2010, 2013 Free Software Foundation, Inc.
|
||||||
@c See the file guile.texi for copying conditions.
|
@c See the file guile.texi for copying conditions.
|
||||||
@c
|
@c
|
||||||
@c Based on the documentation at
|
@c Based on the documentation at
|
||||||
|
@ -16,10 +16,10 @@
|
||||||
@cindex pattern matching (SXML)
|
@cindex pattern matching (SXML)
|
||||||
@cindex SXML pattern matching
|
@cindex SXML pattern matching
|
||||||
|
|
||||||
The @code{(sxml match)} module provides syntactic forms for pattern matching of
|
The @code{(sxml match)} module provides syntactic forms for pattern
|
||||||
SXML trees, in a ``by example'' style reminiscent of the pattern matching of the
|
matching of SXML trees, in a ``by example'' style reminiscent of the
|
||||||
@code{syntax-rules} and @code{syntax-case} macro systems. @xref{sxml simple,
|
pattern matching of the @code{syntax-rules} and @code{syntax-case} macro
|
||||||
the @code{(sxml simple)} module}, for more information on SXML.
|
systems. @xref{SXML}, for more information on SXML.
|
||||||
|
|
||||||
The following example@footnote{This example is taken from a paper by
|
The following example@footnote{This example is taken from a paper by
|
||||||
Krishnamurthi et al. Their paper was the first to show the usefulness of the
|
Krishnamurthi et al. Their paper was the first to show the usefulness of the
|
||||||
|
|
1017
doc/ref/sxml.texi
1017
doc/ref/sxml.texi
File diff suppressed because it is too large
Load diff
|
@ -152,8 +152,8 @@ interested in @code{replace-titles} and @code{filter-empty-elements}.
|
||||||
@xref{texinfo docbook replace-titles,,replace-titles}, and @ref{texinfo
|
@xref{texinfo docbook replace-titles,,replace-titles}, and @ref{texinfo
|
||||||
docbook filter-empty-elements,,filter-empty-elements}.
|
docbook filter-empty-elements,,filter-empty-elements}.
|
||||||
|
|
||||||
Returns a nodeset, as described in @ref{sxml xpath}. That is to say,
|
Returns a nodeset; that is to say, an untagged list of stexi elements.
|
||||||
this function returns an untagged list of stexi elements.
|
@xref{SXPath}, for the definition of a nodeset.
|
||||||
|
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
|
@ -184,10 +184,12 @@ For example:
|
||||||
This module implements transformation from @code{stexi} to HTML. Note
|
This module implements transformation from @code{stexi} to HTML. Note
|
||||||
that the output of @code{stexi->shtml} is actually SXML with the HTML
|
that the output of @code{stexi->shtml} is actually SXML with the HTML
|
||||||
vocabulary. This means that the output can be further processed, and
|
vocabulary. This means that the output can be further processed, and
|
||||||
that it must eventually be serialized by @ref{sxml simple
|
that it must eventually be serialized by @code{sxml->xml}.
|
||||||
sxml->xml,sxml->xml}. References (i.e., the @code{@@ref} family of
|
@xref{Reading and Writing XML}.
|
||||||
commands) are resolved by a @dfn{ref-resolver}. @xref{texinfo html
|
|
||||||
add-ref-resolver!,add-ref-resolver!}, for more information.
|
References (i.e., the @code{@@ref} family of commands) are resolved by a
|
||||||
|
@dfn{ref-resolver}. @xref{texinfo html
|
||||||
|
add-ref-resolver!,add-ref-resolver!}.
|
||||||
|
|
||||||
@subsubsection Usage
|
@subsubsection Usage
|
||||||
@anchor{texinfo html add-ref-resolver!}@defun add-ref-resolver! proc
|
@anchor{texinfo html add-ref-resolver!}@defun add-ref-resolver! proc
|
||||||
|
|
|
@ -127,8 +127,8 @@ basic idea is that HTML is either text, represented by a string, or an
|
||||||
element, represented as a tagged list. So @samp{foo} becomes
|
element, represented as a tagged list. So @samp{foo} becomes
|
||||||
@samp{"foo"}, and @samp{<b>foo</b>} becomes @samp{(b "foo")}.
|
@samp{"foo"}, and @samp{<b>foo</b>} becomes @samp{(b "foo")}.
|
||||||
Attributes, if present, go in a tagged list headed by @samp{@@}, like
|
Attributes, if present, go in a tagged list headed by @samp{@@}, like
|
||||||
@samp{(img (@@ (src "http://example.com/foo.png")))}. @xref{sxml
|
@samp{(img (@@ (src "http://example.com/foo.png")))}. @xref{SXML}, for
|
||||||
simple}, for more information.
|
more information.
|
||||||
|
|
||||||
The good thing about SXML is that HTML elements cannot be confused with
|
The good thing about SXML is that HTML elements cannot be confused with
|
||||||
text. Let's make a new definition of @code{para}:
|
text. Let's make a new definition of @code{para}:
|
||||||
|
@ -1769,7 +1769,7 @@ message body is long enough.)
|
||||||
The web handler interface is a common baseline that all kinds of Guile
|
The web handler interface is a common baseline that all kinds of Guile
|
||||||
web applications can use. You will usually want to build something on
|
web applications can use. You will usually want to build something on
|
||||||
top of it, however, especially when producing HTML. Here is a simple
|
top of it, however, especially when producing HTML. Here is a simple
|
||||||
example that builds up HTML output using SXML (@pxref{sxml simple}).
|
example that builds up HTML output using SXML (@pxref{SXML}).
|
||||||
|
|
||||||
First, load up the modules:
|
First, load up the modules:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue