Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

XML Transform to XML with XSL

[es] :: XML :: XML Transform to XML with XSL

[ Pregleda: 4601 | Odgovora: 6 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

dejanos
Dejan Ostojic
Novi Sad

Član broj: 44613
Poruke: 3
..mtsns-ns.customer.sbb.co.yu.



Profil

icon XML Transform to XML with XSL19.04.2006. u 14:01 - pre 219 meseci
Pozdrav svima!

Imam xml file:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="contacts.xsl"?>

<contacts>
<contact id="1">
<ime>Ime 1</ime>
<prezime>Prezime 1</prezime>
</contact>
<contact id="2">
<ime>Ime 2</ime>
<prezime>Prezime 2</prezime>
</contact>
</contacts>

I preko xsl-a teba da ga transformisem u slican xml file:
<contacts>
<contact>
<userID>1</userID>
<firstName>Ime 1</firstName>
<lastName>Prezime 1</lastName>
</contact>
<contact>
<userID>2</userID>
<firstName>Ime 2</firstName>
<lastName>Prezime 2</lastName>
</contact>
</contacts>

I napravio sam xsl file:

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<contacts>
<xsl:apply-templates/>
</contacts>
</xsl:template>

<xsl:template match="contacts">
<xsl:for-each select="contact">
<contact>
<userID><xsl:value-of select="@id"/></userID>
<firstName><xsl:value-of select="ime"/></firstName>
<lastName><xsl:value-of select="prezime"/></lastName>
</contact>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

I kako sad da ja to pokrenem? :) Mislim da treba ovako da napisem xsl file ali ne znam kako sad da ja to pokrenem pa da dobijem neki novi xml file koji izgleda onako kao sto sam naveo da treba da izgleda.

Pozdrav

[Ovu poruku je menjao dejanos dana 19.04.2006. u 15:01 GMT+1]

[Ovu poruku je menjao dejanos dana 19.04.2006. u 15:05 GMT+1]
Ostojic Dejan
 
Odgovor na temu

Dragi Tata
Malo ispod Kanade

Član broj: 1958
Poruke: 3906
*.lionbridge.com.



+6 Profil

icon Re: XML Transform to XML with XSL19.04.2006. u 14:21 - pre 219 meseci
Treba ti neki XSLT procesor kao što je npr SAXON. A možeš da koristiš i običan web browser sa ugrađenom XSLT podrškom.
 
Odgovor na temu

jablan

Član broj: 8286
Poruke: 4541



+711 Profil

icon Re: XML Transform to XML with XSL19.04.2006. u 14:49 - pre 219 meseci
Ili npr. besplatni tekst editor sa plaginom za XSLT.
 
Odgovor na temu

blaza
n/a

Član broj: 961
Poruke: 743
*.vdial.verat.net.



+3 Profil

icon Re: XML Transform to XML with XSL19.04.2006. u 16:15 - pre 219 meseci
Ako koristis integrisanu podrsku web browser-a, npr. IE-ov MSXML, a pri tome ne zelis da rezultat renderujes unutar prozora browser-a, moras pribeci triku:
npr. http://www.cranesoftwrights.com/resources/debugmsxml/
XML fajlu dodeli .xml ekstenziju.
XSL fajlu dodeli .xsl ekstenziju.
Napravi potreban .bat i .js fajl.
Pokreni .bat i prosledi imena XML fajla, XSL fajla, i ime izlanog fajla.
O_o
 
Odgovor na temu

jablan

Član broj: 8286
Poruke: 4541



+711 Profil

icon Re: XML Transform to XML with XSL19.04.2006. u 16:25 - pre 219 meseci
Moderatori, ovo bi moglo u TOP teme...
 
Odgovor na temu

hakiro
Dejan Djenic

Član broj: 27737
Poruke: 80
194.106.186.*



Profil

icon Re: XML Transform to XML with XSL27.04.2006. u 22:06 - pre 218 meseci
ili altova xmlspy
odlican je , toplo ga preporucujem
code je haiku
 
Odgovor na temu

MilosBGRD1969

Član broj: 63956
Poruke: 76
*.adsl.sezampro.yu.



+1 Profil

icon Re: XML Transform to XML with XSL11.05.2006. u 22:30 - pre 218 meseci
Odlican je Cooktop, a free je: http://www.simtel.net/pub/pd/53216.html
 
Odgovor na temu

[es] :: XML :: XML Transform to XML with XSL

[ Pregleda: 4601 | Odgovora: 6 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.