mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +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 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
|
||||
@c Based on the documentation at
|
||||
|
@ -16,10 +16,10 @@
|
|||
@cindex pattern matching (SXML)
|
||||
@cindex SXML pattern matching
|
||||
|
||||
The @code{(sxml match)} module provides syntactic forms for pattern matching of
|
||||
SXML trees, in a ``by example'' style reminiscent of the pattern matching of the
|
||||
@code{syntax-rules} and @code{syntax-case} macro systems. @xref{sxml simple,
|
||||
the @code{(sxml simple)} module}, for more information on SXML.
|
||||
The @code{(sxml match)} module provides syntactic forms for pattern
|
||||
matching of SXML trees, in a ``by example'' style reminiscent of the
|
||||
pattern matching of the @code{syntax-rules} and @code{syntax-case} macro
|
||||
systems. @xref{SXML}, for more information on SXML.
|
||||
|
||||
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
|
||||
|
|
1087
doc/ref/sxml.texi
1087
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
|
||||
docbook filter-empty-elements,,filter-empty-elements}.
|
||||
|
||||
Returns a nodeset, as described in @ref{sxml xpath}. That is to say,
|
||||
this function returns an untagged list of stexi elements.
|
||||
Returns a nodeset; that is to say, an untagged list of stexi elements.
|
||||
@xref{SXPath}, for the definition of a nodeset.
|
||||
|
||||
@end defun
|
||||
|
||||
|
@ -184,10 +184,12 @@ For example:
|
|||
This module implements transformation from @code{stexi} to HTML. Note
|
||||
that the output of @code{stexi->shtml} is actually SXML with the HTML
|
||||
vocabulary. This means that the output can be further processed, and
|
||||
that it must eventually be serialized by @ref{sxml simple
|
||||
sxml->xml,sxml->xml}. 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!}, for more information.
|
||||
that it must eventually be serialized by @code{sxml->xml}.
|
||||
@xref{Reading and Writing XML}.
|
||||
|
||||
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
|
||||
@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
|
||||
@samp{"foo"}, and @samp{<b>foo</b>} becomes @samp{(b "foo")}.
|
||||
Attributes, if present, go in a tagged list headed by @samp{@@}, like
|
||||
@samp{(img (@@ (src "http://example.com/foo.png")))}. @xref{sxml
|
||||
simple}, for more information.
|
||||
@samp{(img (@@ (src "http://example.com/foo.png")))}. @xref{SXML}, for
|
||||
more information.
|
||||
|
||||
The good thing about SXML is that HTML elements cannot be confused with
|
||||
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
|
||||
web applications can use. You will usually want to build something on
|
||||
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:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue