Главная -> XML&... -> XSLT в примерах 
>> Страница 61 << | Назад | Вперед | Содержание | Указатель

Атрибут encoding определяет, какая кодировка предпочтительна для выходящего документа. Метод вывода "html" должен добавить непосредственно за открывающим тэгом элемента HEAD элемент META с определением используемой кодировки. Преобразование 1 использует для вывода кодировку UTF-8, преобразование 2 — UTF-16, а преобразование 3 — Cp1250.

Преобразование 1

Исходный Surf
<source>

<html>
     <head>
          <title>HTML</title>
     </head>
     <body>
          <h1> HTML output </h1> Žížala šnek kočka pařez bečka měšec výr
     </body>
</html>

</source>

Результат
<html>
  
  <head>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  
     
     <title>HTML</title>
     
  </head>
  
  <body>
     
     <h1> HTML output </h1>
     &#381;&iacute;&#382;ala &#353;nek
     ko&#269;ka pa&#345;ez
     be&#269;ka m&#283;&#353;ec v&yacute;r  
     
  </body>
  
</html>

Представление HTML
HTML Surf Skate Snow Surfing Skateboard

HTML output

Žížala šnek kočka pařez bečka měšec výr
Kevin Carr

Natural Skin Care European Soaps
TickTalk 5
city of stanton
internetusers
This is the website that has all the latest for surf, skate and snow. You can also see it here:. You'll be glad you saw the surf apparel.

Take a moment to visit 1cecilia448 or see them on twitter at 1cecilia448 or view them on facebook at 1cecilia448.

You can also get Organic Skin Care products from Bliss Bath Body and you must check out their Natural Body Lotions and bath soaps

Now if you are looking for the best deals on surf clothing from Quiksilver and Roxy then you have to check these amazing deals here:

Hey, check out this Organic Skin Care European Soaps along with Natural Lavender Body Lotion and shea butter

and we can get surf t shirts surfing shirt and And you must check out this website swim suit swimming suit and swim trunks

Преобразование XSLT
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:output method="html" encoding="UTF-8"/>
<xsl:template match="/">
     <xsl:copy-of select="/source/*"/>
</xsl:template>


</xsl:stylesheet>



Преобразование 2

Исходный Surf
<source>

<html>
     <head>
          <title>HTML</title>
     </head>
     <body>
          <h1> HTML output </h1> Žížala šnek kočka pařez bečka měšec výr
     </body>
</html>

</source>

Результат
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-16">


<title>HTML</title>

</head>

<body>

<h1> HTML output </h1>
&#381;&iacute;&#382;ala &#353;nek
ko&#269;ka pa&#345;ez
be&#269;ka m&#283;&#353;ec v&yacute;r

</body>

</html>

Представление HTML
HTML Surf Skate Snow Surfing Skateboard

HTML output

Žížala šnek kočka pařez bečka měšec výr
Kevin Carr

Natural Skin Care European Soaps
TickTalk 5
city of stanton
internetusers
This is the website that has all the latest for surf, skate and snow. You can also see it here:. You'll be glad you saw the surf apparel.

Take a moment to visit 1cecilia448 or see them on twitter at 1cecilia448 or view them on facebook at 1cecilia448.

You can also get Organic Skin Care products from Bliss Bath Body and you must check out their Natural Body Lotions and bath soaps

Now if you are looking for the best deals on surf clothing from Quiksilver and Roxy then you have to check these amazing deals here:

Hey, check out this Organic Skin Care European Soaps along with Natural Lavender Body Lotion and shea butter

and we can get surf t shirts surfing shirt and And you must check out this website swim suit swimming suit and swim trunks

Преобразование XSLT
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:output method="html" encoding="UTF-16"/>
<xsl:template match="/">
     <xsl:copy-of select="/source/*"/>
</xsl:template>


</xsl:stylesheet>



Преобразование 3

Исходный Surf
<source>

<html>
     <head>
          <title>HTML</title>
     </head>
     <body>
          <h1> HTML output </h1> Žížala šnek kočka pařez bečka měšec výr
     </body>
</html>

</source>

Результат
<html>
  
  <head>
     <meta http-equiv="Content-Type" content="text/html; charset=Cp1250">
  
     
     <title>HTML</title>
     
  </head>
  
  <body>
     
     <h1> HTML output </h1>
     &#381;&iacute;&#382;ala &#353;nek
     ko&#269;ka pa&#345;ez
     be&#269;ka m&#283;&#353;ec v&yacute;r  
     
  </body>
  
</html>

Представление HTML
HTML Surf Skate Snow Surfing Skateboard

HTML output

Žížala šnek kočka pařez bečka měšec výr
Kevin Carr

Natural Skin Care European Soaps
TickTalk 5
city of stanton
internetusers
This is the website that has all the latest for surf, skate and snow. You can also see it here:. You'll be glad you saw the surf apparel.

Take a moment to visit 1cecilia448 or see them on twitter at 1cecilia448 or view them on facebook at 1cecilia448.

You can also get Organic Skin Care products from Bliss Bath Body and you must check out their Natural Body Lotions and bath soaps

Now if you are looking for the best deals on surf clothing from Quiksilver and Roxy then you have to check these amazing deals here:

Hey, check out this Organic Skin Care European Soaps along with Natural Lavender Body Lotion and shea butter

and we can get surf t shirts surfing shirt and And you must check out this website swim suit swimming suit and swim trunks

Преобразование XSLT
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:output method="html" encoding="Cp1250"/>
<xsl:template match="/">
     <xsl:copy-of select="/source/*"/>
</xsl:template>


</xsl:stylesheet>



Преобразование 4

Исходный Surf
<source>

<html>
     <head>
          <title>HTML</title>
     </head>
     <body>
          <h1> HTML output </h1> Žížala šnek kočka pařez bečka měšec výr
     </body>
</html>

</source>

Результат
<html>
  
  <head>
     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  
     
     <title>HTML</title>
     
  </head>
  
  <body>
     
     <h1> HTML output </h1>
     &#381;&iacute;&#382;ala &#353;nek
     ko&#269;ka pa&#345;ez
     be&#269;ka m&#283;&#353;ec v&yacute;r  
     
  </body>
  
</html>

Представление HTML
HTML Surf Skate Snow Surfing Skateboard

HTML output

Žížala šnek kočka pařez bečka měšec výr
Kevin Carr

Natural Skin Care European Soaps
TickTalk 5
city of stanton
internetusers
This is the website that has all the latest for surf, skate and snow. You can also see it here:. You'll be glad you saw the surf apparel.

Take a moment to visit 1cecilia448 or see them on twitter at 1cecilia448 or view them on facebook at 1cecilia448.

You can also get Organic Skin Care products from Bliss Bath Body and you must check out their Natural Body Lotions and bath soaps

Now if you are looking for the best deals on surf clothing from Quiksilver and Roxy then you have to check these amazing deals here:

Hey, check out this Organic Skin Care European Soaps along with Natural Lavender Body Lotion and shea butter

and we can get surf t shirts surfing shirt and And you must check out this website swim suit swimming suit and swim trunks

Преобразование XSLT
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:output method="html" encoding="ISO-8859-1"/>
<xsl:template match="/">
     <xsl:copy-of select="/source/*"/>
</xsl:template>


</xsl:stylesheet>

Raleigh.ruCopyright © 2002

Kevin Carr

Natural Skin Care European Soaps
TickTalk 5
city of stanton
internetusers
This is the website that has all the latest for surf, skate and snow. You can also see it here:. You'll be glad you saw the surf apparel.

Take a moment to visit 1cecilia448 or see them on twitter at 1cecilia448 or view them on facebook at 1cecilia448.

You can also get Organic Skin Care products from Bliss Bath Body and you must check out their Natural Body Lotions and bath soaps

Now if you are looking for the best deals on surf clothing from Quiksilver and Roxy then you have to check these amazing deals here:

Hey, check out this Organic Skin Care European Soaps along with Natural Lavender Body Lotion and shea butter

and we can get surf t shirts surfing shirt and And you must check out this website swim suit swimming suit and swim trunks