翻訳と辞書
Words near each other
・ SXAL/MBAL
・ SXBL
・ Sxc
・ SXDF-NB1006-2
・ Sxe'xn'x
・ SXEmacs
・ SXI
・ Sxip Shirey
・ SXL (band)
・ SXL (disambiguation)
・ SXL Live in Japan
・ SXM
・ SXM (transactional memory)
・ SXM inc
・ SXMJobs.com
SXML
・ SxS
・ SXSW V2V
・ SXT
・ SXU
・ Sxy 5' UTR element
・ SY
・ Sy
・ Sy (disambiguation)
・ SY Aurora
・ SY Aurora's drift
・ Sy Barry
・ Sy Bartlett
・ Sy Berger
・ SY control cable


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

SXML : ウィキペディア英語版
SXML

SXML is an alternative syntax for writing XML data (more precisely, XML Infosets) as S-expressions, to facilitate working with XML data in Lisp and Scheme. An associated suite of tools implements XPath, SAX and XSLT for SXML in Scheme and are available in the GNU Guile implementation of that language.
Textual correspondence between SXML and XML for a sample XML snippet is shown below:
Compared to other alternative representations for XML and its associated languages, SXML has the benefit of being directly parsable by existing Scheme implementations. The associated tools and documentation were praised in many respects by David Mertz in his IBM developerWorks column, though he also criticized the preliminary nature of its documentation and system.
==Example==

Take the following simple XHTML page:

xml:lang="en" lang="en">

An example page


Hi, there!


This is just an >>example<< to show XHTML & SXML.





After translating it to SXML, the same page now looks like this:

(
*TOP
* (@ (
*NAMESPACES
* (x "http://www.w3.org/1999/xhtml")))
(x:html (@ (xml:lang "en") (lang "en"))
(x:head
(x:title "An example page"))
(x:body
(x:h1 (@ (id "greeting")) "Hi, there")
(x:p "This is just an >>example<< to show XHTML & SXML."))))

Each element's tag pair is replaced by a set of parentheses. The tag's name is not repeated at the end, it is simply the first symbol in the list. The element's contents follow, which are either elements themselves or strings. There is no special syntax required for XML attributes. In SXML they are simply represented as just another node, which has the special name of @. This can't cause a name clash with an actual "@" tag, because @ is not allowed as a tag name in XML. This is a common pattern in SXML: anytime a tag is used to indicate a special status or something that is not possible in XML, a name is used that does not constitute a valid XML identifier.
We can also see that there's no need to "escape" otherwise meaningful characters like & and > as &amp; and &gt; entities. All string content is automatically escaped because it is considered to be pure content, and has no tags or entities in it. This also means it is much easier to insert autogenerated content and that there is no danger that we might forget to escape user input when we display it to other users (which could lead to all kinds of nasty cross-site scripting attacks or other annoyances).

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「SXML」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.