www.webdeveloper.com
Results 1 to 3 of 3

Thread: Problem with an XSL showing a XML which uses a XSD

  1. #1
    Join Date
    Dec 2006
    Posts
    92

    Problem with an XSL showing a XML which uses a XSD

    I'm using the following xml file which uses a xsd and try to use a xsl for presentation but it is not beeing used. Instead in my navigator I have only

    Registration Information Mascot Friends Registration Required fields check availability I accept. Create my account. en

    the xml file:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <mf:content xmlns:mf="http://mascotfriends.com" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://mascotfriends.com ../schema/registration.xsd">
    <?xml-stylesheet type="text/xsl" href="../registration.xsl"?>
       <mf:title>Registration Information</mf:title>
       <mf:description>Mascot Friends Registration</mf:description>
       <mf:required>Required fields</mf:required>
       <mf:availability>check availability</mf:availability>
       <mf:submit>I accept. Create my account.</mf:submit>
       <mf:lang>en</mf:lang>
    </mf:content>
    the xsl file:
    Code:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE xsl:stylesheet [<!ENTITY bullet "&#x2022;"> <!ENTITY nbsp "&#xa0;">]>
    <xsl:stylesheet version="1.0" 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
    xmlns:mf="http://mascotfriends.com">
    <xsl:output
     doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
     doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
    
    <xsl:template match="/">
    <html>
    <head>
    </head>
    <body>
       <p>
          <label><xsl:value-of select="mf:content/mf:title"/><span class="red"> *</span>:</label>
          <label><xsl:value-of select="mf:content/mf:description"/><span class="red"> *</span>:</label>
          <label><xsl:value-of select="mf:content/mf:required"/><span class="red"> *</span>:</label>
          <label><xsl:value-of select="mf:content/mf:availability"/><span class="red"> *</span>:</label>
          <label><xsl:value-of select="mf:content/mf:submit"/><span class="red"> *</span>:</label>
          <label><xsl:value-of select="mf:content/mf:lang"/><span class="red"> *</span>:</label>
       </p>
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>
    somebody can give me a clue? Please, please, please. Already did a long research in Google but no solution yet.

  2. #2
    Join Date
    Dec 2006
    Posts
    92

    Nobody has any clue?

    Please... it's very important. I'm trying to use xml to create a multi-language website.

  3. #3
    Join Date
    Dec 2006
    Posts
    92

    Solution founded

    Quote Originally Posted by cyberowl View Post
    Please... it's very important. I'm trying to use xml to create a multi-language website.
    LoL, I found out. The xsl declaration in the xml must be the second declaration and not inside the root element. Stupid error....

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles