Click here to Skip to main content
15,884,986 members
Home / Discussions / XML / XSL
   

XML / XSL

 
AnswerRe: writing to xml file Pin
Estys9-Jun-10 5:22
Estys9-Jun-10 5:22 
GeneralRe: writing to xml file Pin
Farraj9-Jun-10 8:42
Farraj9-Jun-10 8:42 
QuestionHow to access xml file simultaneously at runtime Pin
Raghu_M21-May-10 5:12
Raghu_M21-May-10 5:12 
QuestionUsing SAX and PHP Pin
vho12318-May-10 20:22
vho12318-May-10 20:22 
QuestionXSLT and asp.NET mixture Pin
ceviz16-May-10 13:02
ceviz16-May-10 13:02 
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
Atwind27-Jun-10 23:42 
Questionlanguage localization using XML in VC++ (MFC) Pin
punyah20108-May-10 9:03
punyah20108-May-10 9:03 
QuestionSuppress Xmlns in InnerXML / Rename an XML node in DOM Pin
Ger Hayden6-May-10 11:37
Ger Hayden6-May-10 11:37 
AnswerRe: Suppress Xmlns in InnerXML / Rename an XML node in DOM Pin
Ger Hayden8-May-10 7:24
Ger Hayden8-May-10 7:24 
QuestionParsing RSS Pin
Aljaz1116-May-10 3:37
Aljaz1116-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
vho12329-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
ajweber27-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
ajweber28-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
ajweber28-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
ajweber28-Apr-10 6:52 
QuestionDesperate seeking answer to simple problem Pin
Axiom70m27-Apr-10 5:45
Axiom70m27-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
Axiom70m27-Apr-10 7:47 
GeneralRe: Desperate seeking answer to simple problem Pin
Not Active27-Apr-10 9:41
mentorNot Active27-Apr-10 9:41 

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.