Projekat

Općenito

Profil

Akcije

Podrška #24559

Zatvoren

xml handliranje xslt

Dodano od Ernad Husremović prije više od 14 godina. Izmjenjeno prije više od 14 godina.

Status:
Zatvoreno
Prioritet:
Normalan
Odgovorna osoba:
Početak:
26.09.2011
Završetak:
% završeno:

100%

Procjena vremena:

Fajlovi

report_test.xml (691 Bajta) report_test.xml Ernad Husremović, 26.09.2011 17:46
out.xml (462 Bajta) out.xml Ernad Husremović, 26.09.2011 17:46
Akcije #11

Izmjenjeno od Ernad Husremović prije više od 14 godina

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS >
<TS version="2.0">
  <context>

    <name>APAging</name>
    <message>
      <width>365</width>
      <source>Accounts Payable Aging Report</source>
      <translation type="unfinished"/>
    </message>

    <message>
      <width>40</width>
      <source>As of:</source>
      <translation type="unfinished"/>
    </message>

    <message>
      <width>15</width>
      <source>y</source>
      <translation type="unfinished"/>
    </message>

    ...
  </context>

ova width polja mi prave problem pa bi ih trebao izbaciti prilikom editovanja u qtlinguist a onda na kraju ponovo mergirati u xml fajl.

Akcije #15

Izmjenjeno od Ernad Husremović prije više od 14 godina

instalacija libxslt na macosx https://gist.github.com/443160

Akcije #17

Izmjenjeno od Ernad Husremović prije više od 14 godina

  • Naslov promijenjeno iz xml handliranje u node.js u xml handliranje xslt
Akcije #19

Izmjenjeno od Ernad Husremović prije više od 14 godina

hernad@macan:~/xml$ cat report.xsl

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="xml" indent="yes"/>

  <xsl:template match="/TS">
        <xsl:apply-templates select="context" />
  </xsl:template>

<xsl:template match="context">

    <!-- novi kontekst -->
    <context>
             <namex>
                 <xsl:value-of select="name" />
             </namex>

              <xsl:apply-templates select="message" />
    </context>

</xsl:template>

<xsl:template match="message">
   <message>
      <source>
         <xsl:value-of select="source" />
       </source>
       <translation>
         <xsl:value-of select="translation" />
       </translation>
   </message>
</xsl:template>

</xsl:stylesheet>

Izmjenjeno od Ernad Husremović prije više od 14 godina

hernad@macan:~/xml$ xsltproc report.xsl report_test.xml > out.xml
Akcije #22

Izmjenjeno od Ernad Husremović prije više od 14 godina

  • Projekat promijenjeno iz node.js u developer toolbox
Akcije #23

Izmjenjeno od Ernad Husremović prije više od 14 godina

  • Projekat promijenjeno iz developer toolbox u html/html5/xml
Akcije #24

Izmjenjeno od Ernad Husremović prije više od 14 godina

  • Status promijenjeno iz Dodijeljeno u Zatvoreno
  • % završeno promijenjeno iz 0 u 100
Akcije

Također dostupno kao Atom PDF