Click here to Skip to main content
14,642,979 members
Home » Discussions » XML / XSL
   

XML / XSL

 
AnswerRe: XSLT and asp.NET mixture Pin
Not Active16-May-10 17:08
mentorNot Active16-May-10 17:08 
AnswerRe: XSLT and asp.NET mixture Pin
Atwind27-Jun-10 23:42
MemberAtwind27-Jun-10 23:42 
Questionlanguage localization using XML in VC++ (MFC) Pin
punyah20108-May-10 9:03
Memberpunyah20108-May-10 9:03 
QuestionSuppress Xmlns in InnerXML / Rename an XML node in DOM Pin
Ger Hayden6-May-10 11:37
MemberGer Hayden6-May-10 11:37 
AnswerRe: Suppress Xmlns in InnerXML / Rename an XML node in DOM Pin
Ger Hayden8-May-10 7:24
MemberGer Hayden8-May-10 7:24 
QuestionParsing RSS Pin
Aljaz1116-May-10 3:37
MemberAljaz1116-May-10 3:37 
AnswerRe: Parsing RSS Pin
Stuart Dootson6-May-10 23:24
professionalStuart Dootson6-May-10 23:24 
QuestionXSLT to HTML Pin
vho12329-Apr-10 21:46
Membervho12329-Apr-10 21:46 
Hi programmers, i have this task that has been troubling me due to my limited knowledge of XML/XSLT.
My task is to create an XSLT(dictionary.xslt) file that will use an XML(translation.xml) file as input which in turn will generate a desired HTML(dictionary.html) file like the one below.
- The index must be sorted alphabetically. This index serves as a Table Of Contents which allows users to browse through all 'initials' available in this dictionary.
- For each 'initial', the correct number of 'search' terms must be returned.
-
I will be able to do the css styling but as for the xslt code and functions i have little clue, i'd appreciate if someone here with the knowledge will be able to help me with this.

--- input XML (translation.xml) -----
<?xml version="1.0" encoding="UTF-8"?>
<Dictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
			xsi:noNamespaceSchemaLocation="translation.xsd">
   <from>EN</from>
   <to>ES</to>
   <total>150</total>
   <translation initial="A">
	  <search>A Clockwork Orange</search>
	  <counter>1</counter>
	  <replace>La naranja mecánica</replace>
   </translation>
   <translation initial="A">
	  <search>A Few Good Men</search>
	  <counter>1</counter>
	  <replace>A Few Good Men</replace>
   </translation>
   <translation initial="A">
	  <search>A Star Is Born</search>
	  <counter>1</counter>
	  <replace>Ha nacido una estrella</replace>
   </translation>
   <translation initial="A">
	  <search>Ab Urbe condita</search>
	  <counter>1</counter>
	  <replace>Ab Urbe condita libri</replace>
   </translation>
   <translation initial="A">
	  <search>Ab urbe condita</search>
	  <counter>1</counter>
	  <replace>Ab urbe condita</replace>
   </translation>
   <translation initial="A">
	  <search>Abel</search>
	  <counter>2</counter>
	  <replace>Abel</replace>
	  <replace>Caín</replace>
   </translation>
   <translation initial="B">
	  <search>Batman & Robin</search>
	  <counter>1</counter>
	  <replace>Batman y Robin</replace>
   </translation>
   <translation initial="B">
	  <search>Bomarzo</search>
	  <counter>1</counter>
	  <replace>Bomarzo</replace>
	  etc......
	  ..........
   </translation>


--- DESIRED HTML OUTPUT ----
[url=http://img401.imageshack.us/i/resultf.jpg/][img]http://img401.imageshack.us/img401/5272/resultf.jpg[/img][/url]

---- WHAT I HAVE ATTEMPTED SO FAR ----
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="html" indent="yes"/>
<html>
	  <head>
	  <title>Bilingual Lexicon ES-EN</title>
	  <link href="dictionary.css" rel="stylesheet" type="text/css"  />
	  </head>
	  <body>
<h3>Browse by letter</h3>
	  </body>
</html>
</xsl:stylesheet>

AnswerRe: XSLT to HTML Pin
Stuart Dootson6-May-10 1:00
professionalStuart Dootson6-May-10 1:00 
QuestionCan anyone give me a hand with this? Pin
ajweber27-Apr-10 19:20
Memberajweber27-Apr-10 19:20 
AnswerRe: Can anyone give me a hand with this? Pin
Not Active28-Apr-10 0:54
mentorNot Active28-Apr-10 0:54 
GeneralRe: Can anyone give me a hand with this? Pin
ajweber28-Apr-10 5:59
Memberajweber28-Apr-10 5:59 
GeneralRe: Can anyone give me a hand with this? Pin
Not Active28-Apr-10 6:10
mentorNot Active28-Apr-10 6:10 
GeneralRe: Can anyone give me a hand with this? Pin
ajweber28-Apr-10 6:17
Memberajweber28-Apr-10 6:17 
GeneralRe: Can anyone give me a hand with this? Pin
Not Active28-Apr-10 6:31
mentorNot Active28-Apr-10 6:31 
GeneralRe: Can anyone give me a hand with this? Pin
ajweber28-Apr-10 6:52
Memberajweber28-Apr-10 6:52 
QuestionDesperate seeking answer to simple problem Pin
Axiom70m27-Apr-10 5:45
MemberAxiom70m27-Apr-10 5:45 
AnswerRe: Desperate seeking answer to simple problem Pin
Not Active27-Apr-10 6:57
mentorNot Active27-Apr-10 6:57 
GeneralRe: Desperate seeking answer to simple problem [modified] Pin
Axiom70m27-Apr-10 7:47
MemberAxiom70m27-Apr-10 7:47 
GeneralRe: Desperate seeking answer to simple problem Pin
Not Active27-Apr-10 9:41
mentorNot Active27-Apr-10 9:41 
GeneralRe: Desperate seeking answer to simple problem [modified] Pin
Axiom70m27-Apr-10 21:52
MemberAxiom70m27-Apr-10 21:52 
GeneralRe: Desperate seeking answer to simple problem Pin
Not Active28-Apr-10 0:52
mentorNot Active28-Apr-10 0:52 
GeneralRe: Desperate seeking answer to simple problem Pin
Axiom70m28-Apr-10 2:00
MemberAxiom70m28-Apr-10 2:00 
GeneralRe: Desperate seeking answer to simple problem Pin
Axiom70m29-Apr-10 0:16
MemberAxiom70m29-Apr-10 0:16 
QuestionHow ti create sitemap in xml? Pin
JMecier25-Apr-10 0:59
MemberJMecier25-Apr-10 0:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.