469,323 Members | 1,444 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,323 developers. It's quick & easy.

Having problems on Mozilla firefox (not able to see xml data)..Pls Help.

i m trying to see the xml in a browser using an xslt....

My xml i have defined as

<?xml version=" 1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="Topic_publications_xsl.xsl"?>
<!DOCTYPE root [
<!ENTITY about SYSTEM "publications.xml">

]>

<root>
&about;
</root>


so its extending publications.xml which has the data...

and Topic_publications_xsl.xsl has the logic of showing the data on the browser..

Now this works great on IE but on mozilla firefox it has problems and does not show the data...

Do u have any idea on this??

Also there is a point on mozilla firefox that it does nt accept external DTD's. So is this the reason..

Thanks for the help.
Mar 13 '07 #1
4 1427
dorinbogdan
839 Expert 512MB
What error do you get?
Please post your XSL code, and XML working in IE.
Mar 13 '07 #2
drhowarddrfine
7,435 Expert 4TB
I haven't messed with xml in quite a while but, if this has to do with external entities, it is my understanding Firefox does not handle those yet.
Mar 13 '07 #3
What error do you get?
Please post your XSL code, and XML working in IE.
Ya sure. so there is

Topic_Publications_xml.xml which extends publications.xml

also Topic_Publications_xml.xml used Topic_Publications_xsl.xsl to display on web browser.

Expand|Select|Wrap|Line Numbers
  1.  for Topic_Publications_xml.xml
  2.  
  3.  
Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <?xml-stylesheet type="text/xsl" href="Topic_publications_xsl.xsl"?>
  3. <!DOCTYPE root [
  4. <!ENTITY about SYSTEM "publications.xml">
  5. ]>
  6. <root>
  7.     &about;
  8. </root>
  9.  
  10.  
  11.  
  12.  



[b]
Expand|Select|Wrap|Line Numbers
  1.  for publications.xml
  2.  
  3.  
  4. <?xml version="1.0" encoding="ISO-8859-1"?>
  5.  
  6.  
  7.  
  8. <!-- Template that can be added. Plug in the values and it will be displayed.
  9.  
  10. <Paper monthid="some number">
  11. <Area> </Area>
  12. <Author>
  13. <Name>Ravi Sundaram</Name>
  14. </Author>
  15. <Topic></Topic>
  16. <Year></Year>
  17. <Month></Month>
  18. <Abstract-link></Abstract-link>
  19. <Full-Paper-link></Full-Paper-link>
  20. <Abstract></Abstract>
  21. <Conference></Conference>
  22. </Paper>
  23. -->
  24. <Publications>
  25.  
  26. <Paper > <!--paper 1-->
  27. <Area>A</Area>
  28. <!--<Author>
  29. <Name>Ravi Sundaram</Name>
  30. </Author>-->
  31. <Author>
  32. <Name>abcd</Name>
  33. </Author>
  34. <Author>
  35. <Name>acdsg</Name>
  36. </Author>
  37. <Author>
  38. <Name>bhah</Name>
  39. </Author>
  40. <Topic>hhkjj</Topic>
  41. <Year>2006</Year>
  42. <Month></Month>
  43. <Abstract-link></Abstract-link>
  44. <Full-Paper-link>ghh</Full-Paper-link>
  45. <Abstract>ggg</Abstract>
  46. <Conference>cncna</Conference>
  47. </Paper>
  48.  
  49. <Paper > <!--paper 1-->
  50. <Area>A</Area>
  51. <!--<Author>
  52. <Name>Ravi Sundaram</Name>
  53. </Author>-->
  54. <Author>
  55. <Name>abcd</Name>
  56. </Author>
  57. <Author>
  58. <Name>acdsg</Name>
  59. </Author>
  60. <Author>
  61. <Name>bhah</Name>
  62. </Author>
  63. <Topic>hhkjj</Topic>
  64. <Year>2006</Year>
  65. <Month></Month>
  66. <Abstract-link></Abstract-link>
  67. <Full-Paper-link>ghh</Full-Paper-link>
  68. <Abstract>ggg</Abstract>
  69. <Conference>cncna</Conference>
  70. </Paper>
  71.  
  72. <Paper > <!--paper 1-->
  73. <Area>A</Area>
  74. <!--<Author>
  75. <Name>Ravi Sundaram</Name>
  76. </Author>-->
  77. <Author>
  78. <Name>abcd</Name>
  79. </Author>
  80. <Author>
  81. <Name>acdsg</Name>
  82. </Author>
  83. <Author>
  84. <Name>bhah</Name>
  85. </Author>
  86. <Topic>hhkjj</Topic>
  87. <Year>2006</Year>
  88. <Month></Month>
  89. <Abstract-link></Abstract-link>
  90. <Full-Paper-link>ghh</Full-Paper-link>
  91. <Abstract>ggg</Abstract>
  92. <Conference>cncna</Conference>
  93. </Paper>
  94.  
  95.  
  96.  
  97. <Paper > <!--paper 1-->
  98. <Area>B</Area>
  99. <!--<Author>
  100. <Name>Ravi Sundaram</Name>
  101. </Author>-->
  102. <Author>
  103. <Name>abcd</Name>
  104. </Author>
  105. <Author>
  106. <Name>acdsg</Name>
  107. </Author>
  108. <Author>
  109. <Name>bhah</Name>
  110. </Author>
  111. <Topic>hhkjj</Topic>
  112. <Year>2006</Year>
  113. <Month></Month>
  114. <Abstract-link></Abstract-link>
  115. <Full-Paper-link>ghh</Full-Paper-link>
  116. <Abstract>ggg</Abstract>
  117. <Conference>cncna</Conference>
  118. </Paper>
  119.  
  120. <Paper > <!--paper 1-->
  121. <Area>B</Area>
  122. <!--<Author>
  123. <Name>Ravi Sundaram</Name>
  124. </Author>-->
  125. <Author>
  126. <Name>abcd</Name>
  127. </Author>
  128. <Author>
  129. <Name>acdsg</Name>
  130. </Author>
  131. <Author>
  132. <Name>bhah</Name>
  133. </Author>
  134. <Topic>hhkjj</Topic>
  135. <Year>2006</Year>
  136. <Month></Month>
  137. <Abstract-link></Abstract-link>
  138. <Full-Paper-link>ghh</Full-Paper-link>
  139. <Abstract>ggg</Abstract>
  140. <Conference>cncna</Conference>
  141. </Paper>
  142.  
  143.  
  144. <Paper > <!--paper 1-->
  145. <Area>B</Area>
  146. <!--<Author>
  147. <Name>Ravi Sundaram</Name>
  148. </Author>-->
  149. <Author>
  150. <Name>abcd</Name>
  151. </Author>
  152. <Author>
  153. <Name>acdsg</Name>
  154. </Author>
  155. <Author>
  156. <Name>bhah</Name>
  157. </Author>
  158. <Topic>hhkjj</Topic>
  159. <Year>2006</Year>
  160. <Month></Month>
  161. <Abstract-link></Abstract-link>
  162. <Full-Paper-link>ghh</Full-Paper-link>
  163. <Abstract>ggg</Abstract>
  164. <Conference>cncna</Conference>
  165. </Paper>
  166.  
  167.  
  168.  
  169. <Paper > <!--paper 1-->
  170. <Area>C</Area>
  171. <!--<Author>
  172. <Name>Ravi Sundaram</Name>
  173. </Author>-->
  174. <Author>
  175. <Name>abcd</Name>
  176. </Author>
  177. <Author>
  178. <Name>acdsg</Name>
  179. </Author>
  180. <Author>
  181. <Name>bhah</Name>
  182. </Author>
  183. <Topic>hhkjj</Topic>
  184. <Year>2006</Year>
  185. <Month></Month>
  186. <Abstract-link></Abstract-link>
  187. <Full-Paper-link>ghh</Full-Paper-link>
  188. <Abstract>ggg</Abstract>
  189. <Conference>cncna</Conference>
  190. </Paper>
  191.  
  192. </Publications>
  193.  
  194.  


Expand|Select|Wrap|Line Numbers
  1.  for Topic_Publications_xsl.xsl
Expand|Select|Wrap|Line Numbers
  1.  
  2. <?xml version="1.0" encoding="ISO-8859-1"?>
  3. <xsl:stylesheet version="1.0" 
  4. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  5. xmlns:url="http://www.jclark.com/xt/java/java.net.URLEncoder"
  6.    exclude-result-prefixes="url">
  7.  
  8. <xsl:key name="rows" match="Paper" use="Area" />
  9. <xsl:template match="Publications">
  10.  
  11.  
  12. <html>
  13. <head>
  14. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  15. <title>Ravi Sundaram-Publications</title>
  16. <link href="../css/stylesheet.css" rel="stylesheet" type="text/css" media="all" />
  17. </head>
  18. <body>
  19.  
  20. <font size="3">
  21. <xsl:apply-templates                        
  22.     select="Paper[generate-id(.) = generate-id(key('rows', Area)[1])]" >
  23.      <xsl:sort select="Area"/>            <!-- Select area alphabatecially. Group By-->
  24.  
  25.     </xsl:apply-templates>
  26. </font>
  27.  
  28. </body>
  29. </html>
  30.  
  31. </xsl:template>
  32.  
  33. <xsl:template match="Publications/Paper">
  34. <br/>
  35.  
  36. <b><xsl:value-of select="Area" /></b>            <!-- For each area selected above select all papers-->
  37. <br/>             
  38. <xsl:for-each select="key('rows', Area)">
  39. <xsl:sort select="Year" data-type="number" order="descending"/>
  40. <xsl:sort select="@monthid" data-type="number" order="descending"/>
  41. <br/>
  42.  
  43.    <xsl:choose>
  44.    <xsl:when test="string-length(Full-Paper-link)">       <!--if there is link to paper-->      
  45.    <a>
  46.    <xsl:attribute name="href"><xsl:value-of select="Full-paper-link"/> </xsl:attribute >
  47.    <span style="color: #0000ff">
  48.    <xsl:value-of select="Topic"/> 
  49.    </span>
  50.    </a>
  51.    <br/>
  52.    </xsl:when>
  53.    <xsl:otherwise>
  54.    <xsl:value-of select="Topic"/>                         <!--if there is no link to paper-->
  55.    <br/>
  56.    </xsl:otherwise>
  57.    </xsl:choose>
  58.  
  59.    <xsl:for-each select="Author">
  60.    <xsl:if test="string-length(Name)">
  61.    <xsl:if test="position()=1">
  62.    <xsl:text> with </xsl:text>
  63.    </xsl:if>
  64.  
  65.    <xsl:value-of select="Name"/>     
  66.    <xsl:if test="not(position()=last())">
  67.    <xsl:text>, </xsl:text>
  68.    </xsl:if>
  69.    <xsl:if test="position()=last()">
  70.    <br/>
  71.    </xsl:if>
  72.    </xsl:if> 
  73.    </xsl:for-each>
  74.    <xsl:value-of select="Conference"/>
  75.    <br/>
  76.    <xsl:if test="string-length(Abstract)">
  77.    <xsl:value-of select="Abstract"/>
  78.    <br/>
  79.    </xsl:if>
  80.    </xsl:for-each>
  81.  
  82. </xsl:template>
  83.  
  84.  
  85. </xsl:stylesheet>
  86.  
  87.  



Now if u run this code in an IE it works fine whereas it does not open up in Mozilla.

Kindly guide me.
Thanks
Mar 14 '07 #4
dorinbogdan
839 Expert 512MB
Hi,
Did you succeed to solve the problem ?
If yes, please let me know, in order to close the thread.
Thanks,
Dorin.
Mar 21 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Eric | last post: by
3 posts views Thread by Laiverd.COM | last post: by
15 posts views Thread by IanUK | last post: by
5 posts views Thread by niftyhawk | last post: by
4 posts views Thread by jwwest | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by mdpf | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.