Jump to content


  • Posts

  • Joined

  • Last visited

jo_rocks's Achievements


Newbie (1/7)



  1. Hi all,I have this XSLT: <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="xml" version="1.0" encoding="iso-8859-1" indent="yes"/><xsl:template match="/"><xsl:apply-templates select="//prime"/></xsl:template> <xsl:template match="prime"> <xsl:apply-templates select="note[@style='tt']" /> </xsl:template> <xsl:template match="note/rss/channel"> <xsl:apply-templates select="item"></xsl:template><xsl:template match="item"><item> <title> <xsl:value-of select="title"/> </title> <description> <xsl:value-of select="description"/> </description> <pubDate> <xsl:value-of select="pubDate"/> </pubDate></item></xsl:template><xsl:template match="prime"> <xsl:apply-templates select="note[@style='sms']" /> </xsl:template> <xsl:template match="note/rss/channel"> <xsl:apply-templates select="item"></xsl:template><xsl:template match="item"><item> <title> <xsl:value-of select="title"/> </title> <pubDate> <xsl:value-of select="pubDate"/> </pubDate></item></xsl:template></xsl:stylesheet> I want to show note type =tt and note type = sms in the same page because the content of each type is different, the problem with this xslt is that the note type sms is overwritting the note type = tt, in other words, it's only showing the note type= sms. How can I solve this... Thanks all
  2. jo_rocks

    dtd problem

    Thanks a lot Foxy Mod. It worked!!!
  3. jo_rocks

    XML problem

    Hi all, Thanks FoxyMod for your help, you are absolutely right, it's because the parser of firefox and IE are non-validating parsers so they don't validate external DTD's. I found a solution, and that solution is to install Opera browser then go to opera:config and search for xml external entities and turn on or 1, and voilá! It works! Thanks
  4. jo_rocks

    dtd problem

    Hi all, I have the follow problem, I have an xml file that have this, this xml file can't be changed: <root> <title>Hello</title> <content> <title>Weekend</title> </content></root> I must have a DTD that must validate the xml, now the problem is that I have two nodes with the same name title, this is my proposal, but it doesn't pass the validation, because I can't declare the same name more than once: <!ELEMENT root (title, content)><!ELEMENT title (#PCDATA)><!ELEMENT content (title)><!ELEMENT title (#PCDATA)> This is a school project, and I am obligated to use a dtd to validate an xml. Thanks all!
  5. jo_rocks

    XML problem

    Hi all, I have the following problem, this is the tester.xml<?xml version="1.0" standalone="no"?> <!DOCTYPE document SYSTEM "vali.dtd" [<!ENTITY resource SYSTEM "test.xml" notation><!ELEMENT document (content)><!ELEMENT content ANY> ]> <document> <content> &resource; </content></document> This is the test.xml <?xml version="1.0" encoding="UTF-8"?> <hello> <bye> I have a car! </bye></hello> This is the vali.dtd <!ELEMENT hello (bye)><!ELEMENT bye (#PCDATA)> The problem is that the tester.xml when I drag to firefox to test he doesn't show the content on &resource; and I don't know what to do, I already searched but every website that I find it's explaining the same structure that I made.This is the result of the firefox: <?xml version="1.0"?> <!DOCTYPE document SYSTEM "vali.dtd">- <document> <content></content> </document> Thanks
  • Create New...