Модераторы: diadiavova
  

Поиск:

Ответ в темуСоздание новой темы Создание опроса
> XSLT, Работа с пространствами имен 
:(
    Опции темы
AntonTatu
Дата 18.1.2012, 08:25 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Новичок



Профиль
Группа: Участник
Сообщений: 30
Регистрация: 12.4.2008

Репутация: нет
Всего: нет



Добрый день !

Не получается создать вот для такого XML
Код

<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Edited by XMLSpy® 
<Code_List
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.xxx.xx/xx/Service"

>
-->
<Code_List>

<catalog>
    <cd>
        <title>Empire Burlesque</title>
        <artist>Bob Dylan</artist>
        <country>USA</country>
        <company>Columbia</company>
        <price>10.90</price>
        <year>1985</year>
    </cd>
    <cd>
        <title>Hide your heart</title>
        <artist>Bonnie Tyler</artist>
        <country>UK</country>
        <company>CBS Records</company>
        <price>9.90</price>
        <year>1988</year>
    </cd>
    <cd>
        <title>Greatest Hits</title>
        <artist>Dolly Parton</artist>
        <country>USA</country>
        <company>RCA</company>
        <price>9.90</price>
        <year>1982</year>
    </cd>
    <cd>
        <title>Still got the blues</title>
        <artist>Gary Moore</artist>
        <country>UK</country>
        <company>Virgin records</company>
        <price>10.20</price>
        <year>1990</year>
    </cd>
    <cd>
        <title>Eros</title>
        <artist>Eros Ramazzotti</artist>
        <country>EU</country>
        <company>BMG</company>
        <price>9.90</price>
        <year>1997</year>
    </cd>
    <cd>
        <title>One night only</title>
        <artist>Bee Gees</artist>
        <country>UK</country>
        <company>Polydor</company>
        <price>10.90</price>
        <year>1998</year>
    </cd>
    <cd>
        <title>Sylvias Mother</title>
        <artist>Dr.Hook</artist>
        <country>UK</country>
        <company>CBS</company>
        <price>8.10</price>
        <year>1973</year>
    </cd>
    <cd>
        <title>Maggie May</title>
        <artist>Rod Stewart</artist>
        <country>UK</country>
        <company>Pickwick</company>
        <price>8.50</price>
        <year>1990</year>
    </cd>
    <cd>
        <title>Romanza</title>
        <artist>Andrea Bocelli</artist>
        <country>EU</country>
        <company>Polydor</company>
        <price>10.80</price>
        <year>1996</year>
    </cd>
    <cd>
        <title>When a man loves a woman</title>
        <artist>Percy Sledge</artist>
        <country>USA</country>
        <company>Atlantic</company>
        <price>8.70</price>
        <year>1987</year>
    </cd>
    <cd>
        <title>Black angel</title>
        <artist>Savage Rose</artist>
        <country>EU</country>
        <company>Mega</company>
        <price>10.90</price>
        <year>1995</year>
    </cd>
    <cd>
        <title>1999 Grammy Nominees</title>
        <artist>Many</artist>
        <country>USA</country>
        <company>Grammy</company>
        <price>10.20</price>
        <year>1999</year>
    </cd>
    <cd>
        <title>For the good times</title>
        <artist>Kenny Rogers</artist>
        <country>UK</country>
        <company>Mucik Master</company>
        <price>8.70</price>
        <year>1995</year>
    </cd>
    <cd>
        <title>Big Willie style</title>
        <artist>Will Smith</artist>
        <country>USA</country>
        <company>Columbia</company>
        <price>9.90</price>
        <year>1997</year>
    </cd>
    <cd>
        <title>Tupelo Honey</title>
        <artist>Van Morrison</artist>
        <country>UK</country>
        <company>Polydor</company>
        <price>8.20</price>
        <year>1971</year>
    </cd>
    <cd>
        <title>Soulsville</title>
        <artist>Jorn Hoel</artist>
        <country>Norway</country>
        <company>WEA</company>
        <price>7.90</price>
        <year>1996</year>
    </cd>
    <cd>
        <title>The very best of</title>
        <artist>Cat Stevens</artist>
        <country>UK</country>
        <company>Island</company>
        <price>8.90</price>
        <year>1990</year>
    </cd>
    <cd>
        <title>Stop</title>
        <artist>Sam Brown</artist>
        <country>UK</country>
        <company>A and M</company>
        <price>8.90</price>
        <year>1988</year>
    </cd>
</catalog>
</Code_List>


XSL файл. Проблема с пространством имен, если использовать <Code_List></Code_List>  то все впорядке, но дело в том что XML файл создается не мной и в нем
Код

<Code_List
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.xxx.xx/xx/Service"
>
</Code_List>

и вот такой XSL уже не работает

Код

<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.xxx.xx/xx/Service"
>
exclude-result-prefixes = "xsm"
<xsm:template match="/">
  <html>
  <body>
  <h2>My CD Collection</h2>
    <xsm:for-each select="Code_List/catalog/cd"> <BR/>
     <SPAN STYLE= "font-style:italic">title</SPAN><BR/>
       <xsm:value-of select="title"/><BR/>   
     <SPAN STYLE= "font-style:italic">artist</SPAN> <BR/> 
       <xsm:value-of select="artist"/><BR/>  
     <SPAN STYLE= "font-style:italic">country</SPAN> <BR/>
       <xsm:value-of select="country"/><BR/> 
     <SPAN STYLE= "font-style:italic">company</SPAN> <BR/>
       <xsm:value-of select="company"/><BR/> 
     <SPAN STYLE= "font-style:italic">price</SPAN> <BR/>
       <xsm:value-of select="price"/><BR/> 
     <SPAN STYLE= "font-style:italic">year</SPAN> <BR/>
       <xsm:value-of select="year"/><BR/> 
     </xsm:for-each> 
  </body>
  </html>
</xsm:template>
</xsl:stylesheet>


Что нужно поправить в XSL файле... ?

Это сообщение отредактировал(а) AntonTatu - 18.1.2012, 14:39
PM MAIL   Вверх
diadiavova
Дата 18.1.2012, 11:17 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Доктор Зло(диагност, настоящий, с лицензией и полномочиями)
****


Профиль
Группа: Модератор
Сообщений: 5821
Регистрация: 14.8.2008
Где: В Коньфпольте

Репутация: 22
Всего: 142



Модератор: Название темы должно отражать ее суть!

Добавлено @ 11:21
Цитата(AntonTatu @  18.1.2012,  09:25 Найти цитируемый пост)
Что нужно поправить в XSL файле... ? 

Добавить в преобразование пространство имен http://www.xxx.xx/xx/Service и ассоциировать его с каким-либо префиксом. Новые элементы создавать именно с этим префиксом, а в корне документа в атрибуте exclude-result-prefixes надо указать тот префикс, который будешь для этого использовать.

Это сообщение отредактировал(а) diadiavova - 18.1.2012, 11:27


--------------------
Хочешь получить мудрый совет - читай подписи участников форумов.
Злой доктор Щасзаболит smile
PM   Вверх
AntonTatu
Дата 18.1.2012, 12:01 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Новичок



Профиль
Группа: Участник
Сообщений: 30
Регистрация: 12.4.2008

Репутация: нет
Всего: нет



Цитата(diadiavova @  18.1.2012,  11:17 Найти цитируемый пост)
Добавить в преобразование пространство имен http://www.xxx.xx/xx/Service и ассоциировать его с каким-либо префиксом. Новые элементы создавать именно с этим префиксом, а в корне документа в атрибуте exclude-result-prefixes надо указать тот префикс, который будешь для этого использовать.


Что то у меня ничего неполучилось.... совсем уже запутался... :(

Код

<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.xxx.xx/xx/Service"

>
exclude-result-prefixes = "xsm"

<xsm:template match="/">
  <html>
  <body>
  <h2>My CD Collection</h2>
    <xsm:for-each select="Code_List/catalog/cd"> <BR/>
     <SPAN STYLE= "font-style:italic">title</SPAN><BR/>
       <xsm:value-of select="title"/><BR/>   
     <SPAN STYLE= "font-style:italic">artist</SPAN> <BR/> 
       <xsm:value-of select="artist"/><BR/>  
     <SPAN STYLE= "font-style:italic">country</SPAN> <BR/>
       <xsm:value-of select="country"/><BR/> 
     <SPAN STYLE= "font-style:italic">company</SPAN> <BR/>
       <xsm:value-of select="company"/><BR/> 
     <SPAN STYLE= "font-style:italic">price</SPAN> <BR/>
       <xsm:value-of select="price"/><BR/> 
     <SPAN STYLE= "font-style:italic">year</SPAN> <BR/>
       <xsm:value-of select="year"/><BR/> 
     </xsm:for-each> 
  </body>
  </html>
</xsm:template>
</xsl:stylesheet>




Это сообщение отредактировал(а) AntonTatu - 18.1.2012, 14:26
PM MAIL   Вверх
diadiavova
Дата 18.1.2012, 13:36 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Доктор Зло(диагност, настоящий, с лицензией и полномочиями)
****


Профиль
Группа: Модератор
Сообщений: 5821
Регистрация: 14.8.2008
Где: В Коньфпольте

Репутация: 22
Всего: 142



Цитата(AntonTatu @  18.1.2012,  13:01 Найти цитируемый пост)
Что то у меня ничего неполучилось.... совсем уже запутался... :(

Ну естественно так не получится. Во-первых, я говорил об атрибуте, а ты написал текст
Цитата(AntonTatu @  18.1.2012,  13:01 Найти цитируемый пост)
<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsm="http://www.mikado-parts.ru/WS/Service"
xmlns="http://www.xxx.xx/xx/Service"
>
exclude-result-prefixes = "xsm"

Это надо делать так
Код

<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsm="http://www.mikado-parts.ru/WS/Service"
xmlns="http://www.xxx.xx/xx/Service"
exclude-result-prefixes = "xsm"
>

Тогда это будет атрибут корневого узла.
Во-вторых, я говорил о том, что новый префикс надо применять к создаваемым элементам, а не к элементам xslt.

Хотя, честно говоря, посмотрев внимательнее, я понял, что у тебя проблема не с созданием новых элементов, а со ссылкой на элементы документа. Так что удаление новых префиксов не понадобится. Но принцип тот же, тебе в хсл надо объявить пространство имен, исходного документа и иссылаться на элементы через префикс этого пространства имен. То есть, все что ты делал, делай так же, но со следующими изменениями:
Пространство имен ты уже объявил, теперь, ссылаясь на элементы документа просто указывай их имена вместе с префиксом. То есть выглядеть это будет следующим образом.
Код

<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsm="http://www.mikado-parts.ru/WS/Service">
<xsl:value-of select="title"/>


А дальше, ссылаясь на элемент пиши не так, а так
Код

<xsl:value-of select="xsm:title"/>

 Для остальных элементов тоже самое.


--------------------
Хочешь получить мудрый совет - читай подписи участников форумов.
Злой доктор Щасзаболит smile
PM   Вверх
AntonTatu
Дата 18.1.2012, 15:18 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Новичок



Профиль
Группа: Участник
Сообщений: 30
Регистрация: 12.4.2008

Репутация: нет
Всего: нет



Цитата(diadiavova @  18.1.2012,  13:36 Найти цитируемый пост)
Это надо делать так


не, не работает, т.к. в файле xml вот такое окружение:

Код

<Code_List
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.xxx.xx/xx/Service"
>
</Code_List>


а в файле xsl вот такое:

Код

<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsm="http://www.xxx.xx/xx/Service"

exclude-result-prefixes = "xsm"
>



Для того что бы не возникло путанницы, выкладываю XML и XSL файлы которые получились на данный момент:

XML файл:

Код

<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Edited by XMLSpy® -->
<Code_List
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.xxx.xx/xx/Service"
>

<catalog>
    <cd>
        <title>Empire Burlesque</title>
        <artist>Bob Dylan</artist>
        <country>USA</country>
        <company>Columbia</company>
        <price>10.90</price>
        <year>1985</year>
    </cd>
    <cd>
        <title>Hide your heart</title>
        <artist>Bonnie Tyler</artist>
        <country>UK</country>
        <company>CBS Records</company>
        <price>9.90</price>
        <year>1988</year>
    </cd>
    <cd>
        <title>Greatest Hits</title>
        <artist>Dolly Parton</artist>
        <country>USA</country>
        <company>RCA</company>
        <price>9.90</price>
        <year>1982</year>
    </cd>
    <cd>
        <title>Still got the blues</title>
        <artist>Gary Moore</artist>
        <country>UK</country>
        <company>Virgin records</company>
        <price>10.20</price>
        <year>1990</year>
    </cd>
    <cd>
        <title>Eros</title>
        <artist>Eros Ramazzotti</artist>
        <country>EU</country>
        <company>BMG</company>
        <price>9.90</price>
        <year>1997</year>
    </cd>
    <cd>
        <title>One night only</title>
        <artist>Bee Gees</artist>
        <country>UK</country>
        <company>Polydor</company>
        <price>10.90</price>
        <year>1998</year>
    </cd>
    <cd>
        <title>Sylvias Mother</title>
        <artist>Dr.Hook</artist>
        <country>UK</country>
        <company>CBS</company>
        <price>8.10</price>
        <year>1973</year>
    </cd>
    <cd>
        <title>Maggie May</title>
        <artist>Rod Stewart</artist>
        <country>UK</country>
        <company>Pickwick</company>
        <price>8.50</price>
        <year>1990</year>
    </cd>
    <cd>
        <title>Romanza</title>
        <artist>Andrea Bocelli</artist>
        <country>EU</country>
        <company>Polydor</company>
        <price>10.80</price>
        <year>1996</year>
    </cd>
    <cd>
        <title>When a man loves a woman</title>
        <artist>Percy Sledge</artist>
        <country>USA</country>
        <company>Atlantic</company>
        <price>8.70</price>
        <year>1987</year>
    </cd>
    <cd>
        <title>Black angel</title>
        <artist>Savage Rose</artist>
        <country>EU</country>
        <company>Mega</company>
        <price>10.90</price>
        <year>1995</year>
    </cd>
    <cd>
        <title>1999 Grammy Nominees</title>
        <artist>Many</artist>
        <country>USA</country>
        <company>Grammy</company>
        <price>10.20</price>
        <year>1999</year>
    </cd>
    <cd>
        <title>For the good times</title>
        <artist>Kenny Rogers</artist>
        <country>UK</country>
        <company>Mucik Master</company>
        <price>8.70</price>
        <year>1995</year>
    </cd>
    <cd>
        <title>Big Willie style</title>
        <artist>Will Smith</artist>
        <country>USA</country>
        <company>Columbia</company>
        <price>9.90</price>
        <year>1997</year>
    </cd>
    <cd>
        <title>Tupelo Honey</title>
        <artist>Van Morrison</artist>
        <country>UK</country>
        <company>Polydor</company>
        <price>8.20</price>
        <year>1971</year>
    </cd>
    <cd>
        <title>Soulsville</title>
        <artist>Jorn Hoel</artist>
        <country>Norway</country>
        <company>WEA</company>
        <price>7.90</price>
        <year>1996</year>
    </cd>
    <cd>
        <title>The very best of</title>
        <artist>Cat Stevens</artist>
        <country>UK</country>
        <company>Island</company>
        <price>8.90</price>
        <year>1990</year>
    </cd>
    <cd>
        <title>Stop</title>
        <artist>Sam Brown</artist>
        <country>UK</country>
        <company>A and M</company>
        <price>8.90</price>
        <year>1988</year>
    </cd>
</catalog>
</Code_List>


XSL файл:

Код

<?xml version="1.0" encoding="utf-8"?>
<!-- Edited by XMLSpy® -->

<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsm="http://www.xxx.xx/xx/Service"

exclude-result-prefixes = "xsm"
>

<xsl:template match="/">
  <html>
  <body>
  <h2>My CD Collection</h2>
    <xsl:for-each select="Code_List/catalog/cd"> <BR/>
     <SPAN STYLE= "font-style:italic">title</SPAN><BR/>
       <xsl:value-of select="xsm:title"/><BR/>   
     <SPAN STYLE= "font-style:italic">artist</SPAN> <BR/> 
       <xsl:value-of select="xsm:artist"/><BR/>  
     <SPAN STYLE= "font-style:italic">country</SPAN> <BR/>
       <xsl:value-of select="xsm:country"/><BR/> 
     <SPAN STYLE= "font-style:italic">company</SPAN> <BR/>
       <xsl:value-of select="xsm:company"/><BR/> 
     <SPAN STYLE= "font-style:italic">price</SPAN> <BR/>
       <xsl:value-of select="xsm:price"/><BR/> 
     <SPAN STYLE= "font-style:italic">year</SPAN> <BR/>
       <xsl:value-of select="xsm:year"/><BR/> 
     </xsl:for-each> 
  </body>
  </html>
</xsl:template>
</xsl:stylesheet>



проблема в том что в XML файле объявлено вот такое окружение:
xmlns="http://www.xxx.xx/xx/Service"
как написать правильно... smile  smile  smile 


PM MAIL   Вверх
diadiavova
Дата 18.1.2012, 16:16 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Доктор Зло(диагност, настоящий, с лицензией и полномочиями)
****


Профиль
Группа: Модератор
Сообщений: 5821
Регистрация: 14.8.2008
Где: В Коньфпольте

Репутация: 22
Всего: 142



Цитата(AntonTatu @  18.1.2012,  16:18 Найти цитируемый пост)
не, не работает, т.к. в файле xml вот такое окружение:

Нет, оно у тебя не работает потому, что ты написал
Код

  <xsl:for-each select="Code_List/catalog/cd">

в то время, как надо было
Код

<xsl:for-each select="xsm:Code_List/xsm:catalog/xsm:cd">
Вот код преобразования
Код

<?xml version="1.0" encoding="utf-8"?>
<!-- Edited by XMLSpy® -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsm="http://www.xxx.xx/xx/Service"
exclude-result-prefixes = "xsm"
>
  <xsl:template match="/">
    <html>
      <body>
        <h2>My CD Collection</h2>
        <xsl:for-each select="xsm:Code_List/xsm:catalog/xsm:cd">
          <BR/>
          <SPAN STYLE= "font-style:italic">title</SPAN>
          <BR/>
          <xsl:value-of select="xsm:title"/>
          <BR/>
          <SPAN STYLE= "font-style:italic">artist</SPAN>
          <BR/>
          <xsl:value-of select="xsm:artist"/>
          <BR/>
          <SPAN STYLE= "font-style:italic">country</SPAN>
          <BR/>
          <xsl:value-of select="xsm:country"/>
          <BR/>
          <SPAN STYLE= "font-style:italic">company</SPAN>
          <BR/>
          <xsl:value-of select="xsm:company"/>
          <BR/>
          <SPAN STYLE= "font-style:italic">price</SPAN>
          <BR/>
          <xsl:value-of select="xsm:price"/>
          <BR/>
          <SPAN STYLE= "font-style:italic">year</SPAN>
          <BR/>
          <xsl:value-of select="xsm:year"/>
          <BR/>
        </xsl:for-each>
      </body>
    </html>
  </xsl:template>
</xsl:stylesheet>

А вот результат
Код

<html xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<body>
    <h2>
        My CD Collection</h2>
    <br>
    <span style="font-style: italic">title</span><br>
    Empire Burlesque<br>
    <span style="font-style: italic">artist</span><br>
    Bob Dylan<br>
    <span style="font-style: italic">country</span><br>
    USA<br>
    <span style="font-style: italic">company</span><br>
    Columbia<br>
    <span style="font-style: italic">price</span><br>
    10.90<br>
    <span style="font-style: italic">year</span><br>
    1985<br>
    <br>
    <span style="font-style: italic">title</span><br>
    Hide your heart<br>
    <span style="font-style: italic">artist</span><br>
    Bonnie Tyler<br>
    <span style="font-style: italic">country</span><br>
    UK<br>
    <span style="font-style: italic">company</span><br>
    CBS Records<br>
    <span style="font-style: italic">price</span><br>
    9.90<br>
    <span style="font-style: italic">year</span><br>
    1988<br>
    <br>
    <span style="font-style: italic">title</span><br>
    Greatest Hits<br>
    <span style="font-style: italic">artist</span><br>
    Dolly Parton<br>
    <span style="font-style: italic">country</span><br>
    USA<br>
    <span style="font-style: italic">company</span><br>
    RCA<br>
    <span style="font-style: italic">price</span><br>
    9.90<br>
    <span style="font-style: italic">year</span><br>
    1982<br>
    <br>
    <span style="font-style: italic">title</span><br>
    Still got the blues<br>
    <span style="font-style: italic">artist</span><br>
    Gary Moore<br>
    <span style="font-style: italic">country</span><br>
    UK<br>
    <span style="font-style: italic">company</span><br>
    Virgin records<br>
    <span style="font-style: italic">price</span><br>
    10.20<br>
    <span style="font-style: italic">year</span><br>
    1990<br>
    <br>
    <span style="font-style: italic">title</span><br>
    Eros<br>
    <span style="font-style: italic">artist</span><br>
    Eros Ramazzotti<br>
    <span style="font-style: italic">country</span><br>
    EU<br>
    <span style="font-style: italic">company</span><br>
    BMG<br>
    <span style="font-style: italic">price</span><br>
    9.90<br>
    <span style="font-style: italic">year</span><br>
    1997<br>
    <br>
    <span style="font-style: italic">title</span><br>
    One night only<br>
    <span style="font-style: italic">artist</span><br>
    Bee Gees<br>
    <span style="font-style: italic">country</span><br>
    UK<br>
    <span style="font-style: italic">company</span><br>
    Polydor<br>
    <span style="font-style: italic">price</span><br>
    10.90<br>
    <span style="font-style: italic">year</span><br>
    1998<br>
    <br>
    <span style="font-style: italic">title</span><br>
    Sylvias Mother<br>
    <span style="font-style: italic">artist</span><br>
    Dr.Hook<br>
    <span style="font-style: italic">country</span><br>
    UK<br>
    <span style="font-style: italic">company</span><br>
    CBS<br>
    <span style="font-style: italic">price</span><br>
    8.10<br>
    <span style="font-style: italic">year</span><br>
    1973<br>
    <br>
    <span style="font-style: italic">title</span><br>
    Maggie May<br>
    <span style="font-style: italic">artist</span><br>
    Rod Stewart<br>
    <span style="font-style: italic">country</span><br>
    UK<br>
    <span style="font-style: italic">company</span><br>
    Pickwick<br>
    <span style="font-style: italic">price</span><br>
    8.50<br>
    <span style="font-style: italic">year</span><br>
    1990<br>
    <br>
    <span style="font-style: italic">title</span><br>
    Romanza<br>
    <span style="font-style: italic">artist</span><br>
    Andrea Bocelli<br>
    <span style="font-style: italic">country</span><br>
    EU<br>
    <span style="font-style: italic">company</span><br>
    Polydor<br>
    <span style="font-style: italic">price</span><br>
    10.80<br>
    <span style="font-style: italic">year</span><br>
    1996<br>
    <br>
    <span style="font-style: italic">title</span><br>
    When a man loves a woman<br>
    <span style="font-style: italic">artist</span><br>
    Percy Sledge<br>
    <span style="font-style: italic">country</span><br>
    USA<br>
    <span style="font-style: italic">company</span><br>
    Atlantic<br>
    <span style="font-style: italic">price</span><br>
    8.70<br>
    <span style="font-style: italic">year</span><br>
    1987<br>
    <br>
    <span style="font-style: italic">title</span><br>
    Black angel<br>
    <span style="font-style: italic">artist</span><br>
    Savage Rose<br>
    <span style="font-style: italic">country</span><br>
    EU<br>
    <span style="font-style: italic">company</span><br>
    Mega<br>
    <span style="font-style: italic">price</span><br>
    10.90<br>
    <span style="font-style: italic">year</span><br>
    1995<br>
    <br>
    <span style="font-style: italic">title</span><br>
    1999 Grammy Nominees<br>
    <span style="font-style: italic">artist</span><br>
    Many<br>
    <span style="font-style: italic">country</span><br>
    USA<br>
    <span style="font-style: italic">company</span><br>
    Grammy<br>
    <span style="font-style: italic">price</span><br>
    10.20<br>
    <span style="font-style: italic">year</span><br>
    1999<br>
    <br>
    <span style="font-style: italic">title</span><br>
    For the good times<br>
    <span style="font-style: italic">artist</span><br>
    Kenny Rogers<br>
    <span style="font-style: italic">country</span><br>
    UK<br>
    <span style="font-style: italic">company</span><br>
    Mucik Master<br>
    <span style="font-style: italic">price</span><br>
    8.70<br>
    <span style="font-style: italic">year</span><br>
    1995<br>
    <br>
    <span style="font-style: italic">title</span><br>
    Big Willie style<br>
    <span style="font-style: italic">artist</span><br>
    Will Smith<br>
    <span style="font-style: italic">country</span><br>
    USA<br>
    <span style="font-style: italic">company</span><br>
    Columbia<br>
    <span style="font-style: italic">price</span><br>
    9.90<br>
    <span style="font-style: italic">year</span><br>
    1997<br>
    <br>
    <span style="font-style: italic">title</span><br>
    Tupelo Honey<br>
    <span style="font-style: italic">artist</span><br>
    Van Morrison<br>
    <span style="font-style: italic">country</span><br>
    UK<br>
    <span style="font-style: italic">company</span><br>
    Polydor<br>
    <span style="font-style: italic">price</span><br>
    8.20<br>
    <span style="font-style: italic">year</span><br>
    1971<br>
    <br>
    <span style="font-style: italic">title</span><br>
    Soulsville<br>
    <span style="font-style: italic">artist</span><br>
    Jorn Hoel<br>
    <span style="font-style: italic">country</span><br>
    Norway<br>
    <span style="font-style: italic">company</span><br>
    WEA<br>
    <span style="font-style: italic">price</span><br>
    7.90<br>
    <span style="font-style: italic">year</span><br>
    1996<br>
    <br>
    <span style="font-style: italic">title</span><br>
    The very best of<br>
    <span style="font-style: italic">artist</span><br>
    Cat Stevens<br>
    <span style="font-style: italic">country</span><br>
    UK<br>
    <span style="font-style: italic">company</span><br>
    Island<br>
    <span style="font-style: italic">price</span><br>
    8.90<br>
    <span style="font-style: italic">year</span><br>
    1990<br>
    <br>
    <span style="font-style: italic">title</span><br>
    Stop<br>
    <span style="font-style: italic">artist</span><br>
    Sam Brown<br>
    <span style="font-style: italic">country</span><br>
    UK<br>
    <span style="font-style: italic">company</span><br>
    A and M<br>
    <span style="font-style: italic">price</span><br>
    8.90<br>
    <span style="font-style: italic">year</span><br>
    1988<br>
</body>
</html>



Это сообщение отредактировал(а) diadiavova - 18.1.2012, 16:17


--------------------
Хочешь получить мудрый совет - читай подписи участников форумов.
Злой доктор Щасзаболит smile
PM   Вверх
AntonTatu
Дата 19.1.2012, 08:43 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Новичок



Профиль
Группа: Участник
Сообщений: 30
Регистрация: 12.4.2008

Репутация: нет
Всего: нет



Цитата(diadiavova @  18.1.2012,  16:16 Найти цитируемый пост)
в то время, как надо было


спасибо огромное !!! smile  все получилось, посоветуйте плз. книжку на русском языке где внятно написано про xlm, xsl, я перелопатил уже много чего но про то что 
Код

<xsl:for-each select="xsm:Code_List/xsm:catalog/xsm:cd">


так и не узнал....
PM MAIL   Вверх
diadiavova
Дата 19.1.2012, 10:10 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Доктор Зло(диагност, настоящий, с лицензией и полномочиями)
****


Профиль
Группа: Модератор
Сообщений: 5821
Регистрация: 14.8.2008
Где: В Коньфпольте

Репутация: 22
Всего: 142



Честно говоря посоветовать не могу, нюансы как-то больше на практике узнал. На форуме есть раздел по литературе, так что можно там спросить.
http://forum.vingrad.ru/forum/s/6b2c01145c...literature.html


--------------------
Хочешь получить мудрый совет - читай подписи участников форумов.
Злой доктор Щасзаболит smile
PM   Вверх
  
Ответ в темуСоздание новой темы Создание опроса
Правила форума "XML/XSLT"
diadiavova

Прежде чем опубликовать вопрос, попробуйте воспользоваться поиском - возможно тема уже поднималась.

Также рекомендуем Вам зайти в раздел FAQ ,раздел дополняется и, возможно, там вы увидите готовое решение.

Для ответов на часто задаваемые вопросы существует FAQ раздела. Новости можно публиковать в разделе новостей. Для статей так же есть специальный раздел

Желаем удачи в Вашем деле!


Если Вам понравилась атмосфера форума, заходите к нам чаще! С уважением, diadiavova.

 
0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей)
0 Пользователей:
« Предыдущая тема | XML, XSL | Следующая тема »


 




[ Время генерации скрипта: 0.0836 ]   [ Использовано запросов: 21 ]   [ GZIP включён ]


Реклама на сайте     Информационное спонсорство

 
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности     Powered by Invision Power Board(R) 1.3 © 2003  IPS, Inc.