source7.xml

来自「XML tutorial」· XML 代码 · 共 33 行

XML
33
字号
<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>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?