Results 1 to 4 of 4

Thread: XSL question

  1. #1
    Патриот смешно's Avatar
    Join Date
    Apr 2003
    Location
    Страна чудес
    Posts
    55,561

    Lightbulb XSL question

    никогда не работал с XSL, подскажите простое решение для такой простой задачки, мозг чего-то тормозит.


    skillID is cross reference between data.

    basically I have one XML file like:

    <file>
    <employee>
    <name>Employee 1</name>
    <skillID>100</skillID>
    </employee>
    <employee>
    <name>Employee 2</name>
    <skillID>300</skillID>
    </employee>
    <employee>
    <name>Employee 3</name>
    <skillID>100</skillID>
    </employee>
    ......

    <skills>
    <skillID>100</skillID>
    <SKILL>work involved in serving food and beverages and preparing simple food</SKILL>
    <ABILITY>waiting on tables, portioning, assembling, recording data, assisting, transporting, communicating, cleaning</ABILITY>
    </skills>
    <skills>
    <skillID>300</skillID>
    <SKILL>perform laboring duties that involve little or no specialized skill or prior work experience</SKILL>
    <ABILITY>loading, moving, mowing, trimming, washing, clearing, digging, landscaping</ABILITY>
    </skills>
    ......

    </file>


    Whould like to format it to XML file like:


    <file>
    <employee>
    <name>Employee 1</name>
    <SKILL>work involved in serving food and beverages and preparing simple food</SKILL>
    <ABILITY>waiting on tables, portioning, assembling, recording data, assisting, transporting, communicating, cleaning</ABILITY>
    </employee>
    <employee>
    <name>Employee 2</name>
    <SKILL>perform laboring duties that involve little or no specialized skill or prior work experience</SKILL>
    <ABILITY>loading, moving, mowing, trimming, washing, clearing, digging, landscaping</ABILITY>
    </employee>
    <employee>
    <name>Employee 3</name>
    <SKILL>work involved in serving food and beverages and preparing simple food</SKILL>
    <ABILITY>waiting on tables, portioning, assembling, recording data, assisting, transporting, communicating, cleaning</ABILITY>
    </employee>

    .....


    </file>
    4 main reasons why Boston is the best place to live:Red Sox (Baseball), Patriots (Football) World Champions
    Celtics the NBA (Basketball), Bruins Stanley Cup (Hockey)

  2. #2
    Патриот смешно's Avatar
    Join Date
    Apr 2003
    Location
    Страна чудес
    Posts
    55,561

    Default Re: XSL question

    никто не может? ЛОЛ
    4 main reasons why Boston is the best place to live:Red Sox (Baseball), Patriots (Football) World Champions
    Celtics the NBA (Basketball), Bruins Stanley Cup (Hockey)

  3. #3
    подниматель пингвинов crazy-mike's Avatar
    Join Date
    Nov 2006
    Location
    L'viv
    Posts
    179,963

    Default Re: XSL question

    Quote Originally Posted by смешно View Post
    никто не может? ЛОЛ
    У меня где-то в книжке об XSLT есть - но я этим совсем не пользуюсь. У меня навязчивая идея - на всех веб-страничках только css и javascript.
    Там для XML в твоём пример ведь и разметка немного неудобная. Аттрибуты тегов вообще не используются почему-то.
    Жизнь дается человеку один раз и прожить ее надо так, чтобы не ошибиться в рецептах.
    Строить Асгардию побуждает тьма, посетившая людские души

  4. #4
    Патриот смешно's Avatar
    Join Date
    Apr 2003
    Location
    Страна чудес
    Posts
    55,561

    Default Re: XSL question

    ладно, сделал уже сам. всем спасибо.
    4 main reasons why Boston is the best place to live:Red Sox (Baseball), Patriots (Football) World Champions
    Celtics the NBA (Basketball), Bruins Stanley Cup (Hockey)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Russian America Top. Рейтинг ресурсов Русской Америки. Terms of Service | Privacy Policy Рейтинг@Mail.ru