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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • viral612
    New Member
    • Mar 2007
    • 3

    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_pub lications_xsl.x sl"?>
    <!DOCTYPE root [
    <!ENTITY about SYSTEM "publications.x ml">

    ]>

    <root>
    &about;
    </root>


    so its extending publications.xm l which has the data...

    and Topic_publicati ons_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.
  • dorinbogdan
    Recognized Expert Contributor
    • Feb 2007
    • 839

    #2
    What error do you get?
    Please post your XSL code, and XML working in IE.

    Comment

    • drhowarddrfine
      Recognized Expert Expert
      • Sep 2006
      • 7434

      #3
      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.

      Comment

      • viral612
        New Member
        • Mar 2007
        • 3

        #4
        Originally posted by dorinbogdan
        What error do you get?
        Please post your XSL code, and XML working in IE.
        Ya sure. so there is

        Topic_Publicati ons_xml.xml which extends publications.xm l

        also Topic_Publicati ons_xml.xml used Topic_Publicati ons_xsl.xsl to display on web browser.

        Code:
         for Topic_Publications_xml.xml
        Code:
        <?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>
        
        
        
         [B][/B]



        [B]
        Code:
         for publications.xml
        
        
        <?xml version="1.0" encoding="ISO-8859-1"?>
        
        
        
        <!-- Template that can be added. Plug in the values and it will be displayed.
        
        <Paper monthid="some number">
        <Area> </Area>
        <Author>
        <Name>Ravi Sundaram</Name>
        </Author>
        <Topic></Topic>
        <Year></Year>
        <Month></Month>
        <Abstract-link></Abstract-link>
        <Full-Paper-link></Full-Paper-link>
        <Abstract></Abstract>
        <Conference></Conference>
        </Paper>
        -->
        <Publications>
        
        <Paper > <!--paper 1-->
        <Area>A</Area>
        <!--<Author>
        <Name>Ravi Sundaram</Name>
        </Author>-->
        <Author>
        <Name>abcd</Name>
        </Author>
        <Author>
        <Name>acdsg</Name>
        </Author>
        <Author>
        <Name>bhah</Name>
        </Author>
        <Topic>hhkjj</Topic>
        <Year>2006</Year>
        <Month></Month>
        <Abstract-link></Abstract-link>
        <Full-Paper-link>ghh</Full-Paper-link>
        <Abstract>ggg</Abstract>
        <Conference>cncna</Conference>
        </Paper>
        
        <Paper > <!--paper 1-->
        <Area>A</Area>
        <!--<Author>
        <Name>Ravi Sundaram</Name>
        </Author>-->
        <Author>
        <Name>abcd</Name>
        </Author>
        <Author>
        <Name>acdsg</Name>
        </Author>
        <Author>
        <Name>bhah</Name>
        </Author>
        <Topic>hhkjj</Topic>
        <Year>2006</Year>
        <Month></Month>
        <Abstract-link></Abstract-link>
        <Full-Paper-link>ghh</Full-Paper-link>
        <Abstract>ggg</Abstract>
        <Conference>cncna</Conference>
        </Paper>
        
        <Paper > <!--paper 1-->
        <Area>A</Area>
        <!--<Author>
        <Name>Ravi Sundaram</Name>
        </Author>-->
        <Author>
        <Name>abcd</Name>
        </Author>
        <Author>
        <Name>acdsg</Name>
        </Author>
        <Author>
        <Name>bhah</Name>
        </Author>
        <Topic>hhkjj</Topic>
        <Year>2006</Year>
        <Month></Month>
        <Abstract-link></Abstract-link>
        <Full-Paper-link>ghh</Full-Paper-link>
        <Abstract>ggg</Abstract>
        <Conference>cncna</Conference>
        </Paper>
        
        
        
        <Paper > <!--paper 1-->
        <Area>B</Area>
        <!--<Author>
        <Name>Ravi Sundaram</Name>
        </Author>-->
        <Author>
        <Name>abcd</Name>
        </Author>
        <Author>
        <Name>acdsg</Name>
        </Author>
        <Author>
        <Name>bhah</Name>
        </Author>
        <Topic>hhkjj</Topic>
        <Year>2006</Year>
        <Month></Month>
        <Abstract-link></Abstract-link>
        <Full-Paper-link>ghh</Full-Paper-link>
        <Abstract>ggg</Abstract>
        <Conference>cncna</Conference>
        </Paper>
        
        <Paper > <!--paper 1-->
        <Area>B</Area>
        <!--<Author>
        <Name>Ravi Sundaram</Name>
        </Author>-->
        <Author>
        <Name>abcd</Name>
        </Author>
        <Author>
        <Name>acdsg</Name>
        </Author>
        <Author>
        <Name>bhah</Name>
        </Author>
        <Topic>hhkjj</Topic>
        <Year>2006</Year>
        <Month></Month>
        <Abstract-link></Abstract-link>
        <Full-Paper-link>ghh</Full-Paper-link>
        <Abstract>ggg</Abstract>
        <Conference>cncna</Conference>
        </Paper>
        
        
        <Paper > <!--paper 1-->
        <Area>B</Area>
        <!--<Author>
        <Name>Ravi Sundaram</Name>
        </Author>-->
        <Author>
        <Name>abcd</Name>
        </Author>
        <Author>
        <Name>acdsg</Name>
        </Author>
        <Author>
        <Name>bhah</Name>
        </Author>
        <Topic>hhkjj</Topic>
        <Year>2006</Year>
        <Month></Month>
        <Abstract-link></Abstract-link>
        <Full-Paper-link>ghh</Full-Paper-link>
        <Abstract>ggg</Abstract>
        <Conference>cncna</Conference>
        </Paper>
        
        
        
        <Paper > <!--paper 1-->
        <Area>C</Area>
        <!--<Author>
        <Name>Ravi Sundaram</Name>
        </Author>-->
        <Author>
        <Name>abcd</Name>
        </Author>
        <Author>
        <Name>acdsg</Name>
        </Author>
        <Author>
        <Name>bhah</Name>
        </Author>
        <Topic>hhkjj</Topic>
        <Year>2006</Year>
        <Month></Month>
        <Abstract-link></Abstract-link>
        <Full-Paper-link>ghh</Full-Paper-link>
        <Abstract>ggg</Abstract>
        <Conference>cncna</Conference>
        </Paper>
        
        </Publications>
        
         [B][/B]


        Code:
         for Topic_Publications_xsl.xsl
        Code:
        <?xml version="1.0" encoding="ISO-8859-1"?>
        <xsl:stylesheet version="1.0" 
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:url="http://www.jclark.com/xt/java/java.net.URLEncoder"
           exclude-result-prefixes="url">
        
        <xsl:key name="rows" match="Paper" use="Area" />
        <xsl:template match="Publications">
         
        
        <html>
        <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <title>Ravi Sundaram-Publications</title>
        <link href="../css/stylesheet.css" rel="stylesheet" type="text/css" media="all" />
        </head>
        <body>
        
        <font size="3">
        <xsl:apply-templates						
            select="Paper[generate-id(.) = generate-id(key('rows', Area)[1])]" >
             <xsl:sort select="Area"/>			<!-- Select area alphabatecially. Group By-->
           
            </xsl:apply-templates>
        </font>
        
        </body>
        </html>
        
        </xsl:template>
        
        <xsl:template match="Publications/Paper">
        <br/>
          
        <b><xsl:value-of select="Area" /></b>			<!-- For each area selected above select all papers-->
        <br/> 			
        <xsl:for-each select="key('rows', Area)">
        <xsl:sort select="Year" data-type="number" order="descending"/>
        <xsl:sort select="@monthid" data-type="number" order="descending"/>
        <br/>
              
           <xsl:choose>
           <xsl:when test="string-length(Full-Paper-link)">       <!--if there is link to paper-->      
           <a>
           <xsl:attribute name="href"><xsl:value-of select="Full-paper-link"/> </xsl:attribute >
           <span style="color: #0000ff">
           <xsl:value-of select="Topic"/> 
           </span>
           </a>
           <br/>
           </xsl:when>
           <xsl:otherwise>
           <xsl:value-of select="Topic"/>                         <!--if there is no link to paper-->
           <br/>
           </xsl:otherwise>
           </xsl:choose>
        	   
           <xsl:for-each select="Author">
           <xsl:if test="string-length(Name)">
           <xsl:if test="position()=1">
           <xsl:text> with </xsl:text>
           </xsl:if>
            
           <xsl:value-of select="Name"/> 	
           <xsl:if test="not(position()=last())">
           <xsl:text>, </xsl:text>
           </xsl:if>
           <xsl:if test="position()=last()">
           <br/>
           </xsl:if>
           </xsl:if> 
           </xsl:for-each>
           <xsl:value-of select="Conference"/>
           <br/>
           <xsl:if test="string-length(Abstract)">
           <xsl:value-of select="Abstract"/>
           <br/>
           </xsl:if>
           </xsl:for-each>
          
        </xsl:template>
        
        
        </xsl:stylesheet>
        
         [B][/B]



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

        Kindly guide me.
        Thanks

        Comment

        • dorinbogdan
          Recognized Expert Contributor
          • Feb 2007
          • 839

          #5
          Hi,
          Did you succeed to solve the problem ?
          If yes, please let me know, in order to close the thread.
          Thanks,
          Dorin.

          Comment

          Working...