📄 source.xml
字号:
<description lang='eng'>If the start-tag is in the content of another element, the end-tag is in the content of the same element. More simply stated, the elements, delimited by start- and end-tags, nest properly within each other. </description>
<!-- <description lang='cze'>Pokud se po膷谩te膷n铆 tag nach谩z铆 v obsahu n臎jak茅ho elementu, koncov媒 tag se mus铆 nach谩zet ve stejn茅m elementu. </description> -->
<demo type="wf">
<description lang='eng'>Elements are properly nested. </description>
<!-- <description lang='cze'>Elementy jsou spr谩vn臎 vno艡eny.</description> -->
<doc>
{Weight}
{number}12{/number}
{unit}grams{/unit}
{/Weight}
</doc>
</demo>
<demo type="wf">
<description lang='eng'>Another well formed document</description>
<!-- <description lang='cze'>Dal拧铆 spr谩vn臎 form谩tovan媒 dokument</description> -->
<doc>
{book}
{chapter}
{title}Introduction{/title}
{/chapter}
{chapter}
{title}Story{/title}
{subChapter}
{title}Part 1{/title}
{/subChapter}
{subChapter}
{title}Part 2{/title}
{/subChapter}
{/chapter}
{chapter}
{title}Index{/title}
{/chapter}
{/book}
</doc>
</demo>
<demo type="notwf">
<description lang='eng'>Element {italic} is not properly nested</description>
<!-- <description lang='cze'>Element {italic} nespl艌uje v媒拧e uvedenou podm铆nku</description> -->
<doc>
{text}
{bold}{italic}XML<error>{/bold}</error>{/italic}
{/text}
</doc>
</demo>
</XTutorial><XTutorial id="5" next="6" previous="4">
<description lang='eng'>The end of every element that begins with a start-tag must be marked by an end-tag containing a name that echoes the element's type as given in the start-tag. The text between the start-tag and end-tag is called the element's content. An element without content can take a special form: {name/} . The slash before } substitutes the end tag. </description>
<!-- <description lang='cze'>Konec ka啪d茅ho elementu, kter媒 za膷铆n谩 po膷谩te膷n铆m tagem mus铆 b媒t ozna膷en koncov媒m tagem, kter媒 nese stejn茅 jm茅no jako tag po膷谩te膷n铆. Text mezi po膷谩te膷n铆m a koncov媒m tagem se naz媒v谩 obsah elementu. Element, kter媒 nem谩 啪谩dn媒 obsah, m暖啪e b媒t uveden ve speci谩ln铆 form臎: {jm茅no/}. Lom铆tko p艡ed } nahrazuje koncov媒 tag.</description> -->
<demo type="wf">
<description lang='eng'>Each element has either the end tag or takes the special form. There is no difference between {AAA}{/AAA} and {AAA/} in XML.</description>
<!-- <description lang='cze'>Ka啪d媒 element mus铆 m铆t bu膹to koncov媒 tag nebo mus铆 b媒t uveden ve speci谩ln铆 form臎. Mezi z谩pisy {AAA}{/AAA} a {AAA/} nen铆 v XML 啪谩dn媒 rozd铆l.</description> -->
<doc>
{listOfTags}
{AAA}{/AAA}
{BBB}{/BBB}
{CCC/}
{DDD/}
{/listOfTags}
</doc>
</demo>
<demo type="notwf">
<description lang='eng'>Missing slash is a very common error</description>
<!-- <description lang='cze'>Chyb臎j铆c铆 lom铆tko je velmi 膷ast谩 chyba.</description> -->
<doc>
{description}
There are {color}yellow<error>{color}</error> and {color}red{/color} apples.
{/description}
</doc>
</demo>
</XTutorial><XTutorial id="6" next="7" previous="5">
<description lang='eng'>Element names can contain letters, digits, hyphens, underscores, colons, or full stops. A colon can be used only in a special case where it separates so called namespace. Element names starting with xml, XML or other combination of cases of this string are reserved for the standard. </description>
<!-- <description lang='cze'>N谩zev elementu m暖啪e obsahovat p铆smena, 膷铆slice, podtr啪铆tko, odd臎lovn铆k, dvojte膷ku nebo te膷ku. Dvojte膷ka m暖啪e b媒t pou啪ita pouze ve speci谩ln铆m p艡铆pad臎, kdy odd臎luje tzv. jmenn媒 prostor. N谩zev elementu m暖啪e za膷铆nat pouze p铆smenem, podtr啪铆tkem nebo dvojte膷kou. N谩zvy element暖 za膷铆naj铆c铆 na xml, XML nebo jinou kombinaci velikost铆 t臎chto p铆smen jsou vyhrazeny pro standard.</description> -->
<demo type="wf">
<description lang='eng'>Document with permitted characters</description>
<!-- <description lang='cze'>Dokument s povolen媒mi znaky</description> -->
<doc>
{permittedNames}
{name/}
{xsl:copy-of/}
{A_long_element_name/}
{A.name.separated.with.full.stops/}
{a123323123-231-231/}
{_12/}
{/permittedNames}
</doc>
</demo>
<demo type="notwf">
<description lang='eng'>This document contains several errors. </description>
<!-- <description lang='cze'>Tento dokument obsahuje 艡adu chyb. </description> -->
<doc>
{forbiddenNames}
{A<error>;</error>name/}
{last<error>@</error>name}
{<error>@#$%^()%+?=</error>/}
{A<error>*</error>2/}
{<error>1</error>ex/}
{/forbiddenNames}
</doc>
</demo>
<demo type="notwf">
<description lang='eng'>The names cannot start with xml</description>
<!-- <description lang='cze'>N谩zvy nesm臎j铆 za膷铆nat s xml</description> -->
<doc>
{forbiddenNames}
{<error>xml</error>Tag/}
{<error>XML</error>Tag/}
{<error>XmL</error>Tag/}
{<error>xMl</error>Tag/}
{<error>xmL</error>Tag/}
{/forbiddenNames}
</doc>
</demo>
</XTutorial>
<XTutorial id="7" next="8" previous="6">
<description lang='eng'>An element can have none, one or several attributes. Permitted characters are the same as for element names. The name of attribute is separated from its value by =. The attribute value must be given inside apostrophes '...' or double-quotes "..." . If an apostrophe or double-quote is used in the attribute value the opposite delimiter must be used. </description>
<!-- <description lang='cze'>Element m暖啪e m铆t 啪谩dn媒, jeden nebo n臎kolik atribut暖. Pro jejich n谩zvy plat铆 stejn谩 pravidla jako pro n谩zvy element暖. Jm茅no atributu je odd臎leno od jeho hodnoty rovn铆tkem = . Hodnota atributu mus铆 b媒t uvedena uvnit艡 apostrof暖 '...' nebo uvozovek "..." . Pokud jsou apostrofy nebo uvozovky pou啪ity v hodnot臎 atributu, mus铆 b媒t pou啪it opa膷n媒 odd臎lova膷. </description> -->
<demo type="wf">
<description lang='eng'>Document with well formed attributes</description>
<!-- <description lang='cze'>Dokument se spr谩vn臎 form谩tovan媒mi atributy</description> -->
<doc>
{elements-with-attributes}
{el _ok = "yes" /}
{one attr = "a value"/}
{several first="1" second = '2' third= "333"/}
{apos_quote case1="John's" case2='He said: "Hello, world!" '/}
{/elements-with-attributes}
</doc>
</demo>
<demo type="notwf">
<description lang='eng'>Document with erroneous attributes</description>
<!-- <description lang='cze'>Dokument s chybn媒mi atributy</description> -->
<doc>
{errors}
{wrong_char a<error>*</error>b = "23432"/}
{mismatched_separator value = <error>"</error>12<error>'</error>/}
{wrong_separator_type value="aa<error>"</error>aa"/}
{wrong_separator_type value='bb<error>'</error>bb'/}
{wrong_start <error>XML</error>-ID = "xml234"/}
{/errors}
</doc>
</demo>
</XTutorial><XTutorial id="8" next="9" previous="7">
<description lang='eng'>Characters < and & cannot be used in text as they are used in markup. If these characters are needed &lt; must be used insted of < and &amp; instead of & </description>
<!-- <description lang='cze'>Znaky < a & nemohou b媒t pou啪ity v textu, nebo钮 jsou ur膷eny pro zna膷kov谩n铆. Pokud jsou pot艡eba, &lt; mus铆 b媒t pou啪ito m铆sto < a &amp; m铆sto & </description> -->
<demo type="wf">
<description lang='eng'>& and < substitution</description>
<!-- <description lang='cze'>& a < substituce</description> -->
<doc>
{example}
{isLower}
23 &lt; 46
{/isLower}
{ampersand}
Willey &amp; sons
{/ampersand}
{/example}
</doc>
</demo>
<demo type="notwf">
<description lang='eng'>Characters & and < cannot be used inside text</description>
<!-- <description lang='cze'>Znaky & a < nemohou b媒t pou啪ity v textu</description> -->
<doc>
{example}
{isLower}
23 <error><</error> 46
{/isLower}
{ampersand}
Willey <error>&</error> sons
{/ampersand}
{/example}
</doc>
</demo>
</XTutorial><XTutorial id="9" next="10" previous="8">
<description lang='eng'>Characters >, " , and ' can be also substituted by &gt; , &quot; and &apos; , respectively</description>
<!-- <description lang='cze'>Znaky >, " a ' mohou b媒t rovn臎啪 nahrazeny &gt; , &quot; a &apos;</description> -->
<demo type="wf">
<description lang='eng'>Possible substitutions</description>
<!-- <description lang='cze'>Mo啪n茅 substituce</description> -->
<doc>
{example}
{right-bracket} both > and &gt; permitted{/right-bracket}
{double-quote} both " and &quot; permitted{/double-quote}
{apostrophe} both ' and &apos; permitted{/apostrophe}
Useful in: {el value=" &apos; &quot; &apos; "/}
{/example}
</doc>
</demo>
</XTutorial></allExamples>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -