翻訳と辞書
Words near each other
・ SX-Window
・ SX2190
・ SX250/SX2150
・ SX4
・ SXF
・ SXGA
・ Sxga
・ SXL
・ SxL
・ SXM
・ SXML
・ SxOxB
・ SxOxU
・ SXSW
・ SY
・ Sy
・ sy
・ SY-1
・ SY01
・ SY99


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

SXML : ウィキペディア日本語版
SXML

SXMLは、XMLデータをS式の形式で記述、処理するための方法である。
SXMLとXMLの字句上の対応について、小さなサンプルのXMLを以下に示す:
上記の例から、以下の2つの点に気づくであろう:
# XMLとSXMLの字句上の表記はよく似ている: 非形式的に言うと、SXMLは山括弧の代わりに丸括弧を用いているという点でXMLとは字句的に違う。
# SXMLは、XMLデータに対する直接的な字句上の表記というだけでなく、既存の数多くのプログラミング言語で第一級またはそれに準ずる基本的なデータ構造でもあり、それゆえ汎用のプログラミング言語によるXMLデータ処理の実例になっている。
SXMLとして具現化されたS式がXMLと似ていることから、XMLデータとプログラミング言語を密接に統合でき、結果としてアプリケーションにおけるXMLデータの処理が説明的で単純になる。
==Motivation==

XML data processing languages suggested by the W3 Consortium, such as XPath, XSLT, XQuery etc., are not general-purpose programming languages and are thus not sufficient for implementing complete applications.
For this reason, most XML applications are implemented by means of traditional programming languages, such as C and Java; or scripting languages, for example, Perl, JavaScript and Python.
An attempt to combine two different languages (for example, XPath and Java) leads to a problem known as impedance mismatch.
Impedance mismatch problem consists of two aspects:
* Different data models. E.g. XPath models an XML document as a tree, while most general purpose programming languages have no native data types for a tree.
* Different programming paradigms. Say, XSLT is a functional language, while Java is object-oriented, and Perl is a procedural one.
Impedance mismatch requires complicated converters and APIs (for example, DOM) to be used for combining such two languages.
Impedance mismatch problem can be reduced and even eliminated using the Scheme functional programming language for XML data processing
〔Kirill Lisovskiy, Dmitry Lizorkin. "SXML: an XML document as an S-expression" // Russian Digital Libraries Journal. – Moscow: IIS, 2003. – Vol. 6, No 2. – ISSN 1562-5419. - http://modis.ispras.ru/Lizorkin/Publications/sxml-eng.pdf〕:
* Nested lists (S-expressions in Scheme) provide a natural representation for nested XML documents. Scheme represents its code and data as nested lists of dynamically typed elements. XML document, being a hierarchical structure of nested XML elements, can be thought of as a hierarchical nested Scheme list (so-called S-expression).
* Scheme is a functional language, as most XML-languages are (e.g. XSLT and XQuery). Scheme processes (nested) lists in a recursive manner which can be thought of as traversing/transforming the document tree.
Scheme, being a Lisp dialect, is a widely recognized scripting language.
It is one of the most elegant and compact programming languages practically used: the description of Scheme standard consists
of 40 pages only.
Scheme is a high-level programming language, suitable for fast prototyping.
Moreover, Scheme programs are generally several times more compact than the equivalent C programs.
XML and SXML textual notations are much alike: informally, SXML replaces XML start/end tags with opening/closing brackets.
On the other hand, SXML is an S-expression and is thus the main data structure for Scheme programming language, and consequently SXML can be easily and naturally processed via Scheme.

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




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

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