DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: New XML Namespace Issue (try to have nba.xml nba.xsd nba.css at same local dir)

  1. #1
    Join Date
    May 2011
    Posts
    2

    New XML Namespace Issue (try to have nba.xml nba.xsd nba.css at same local dir)

    Code:
    <?xml version="1.0" encoding="utf-8" ?>
    <?xml-Stylesheet type="text/css" href="nba.css"?>
    <!-- Namespace Questions, Transforming XML, Schema and CSS -->
    
    <nba  xsi:schemaLocation="urn:testLac nba.xsd"
               xsi:xmlns="http://www.w3.org/2001/XMLSchema-instance">
    
    	<title>NBA Final</title>
    
    	<team>LAKER
    			<wins>0</wins>
    			<losses>1</losses>
    			<opponent>Dallas
    				<location>Game1</location>
    				<goals-for>94</goals-for>
    				<goals-against>96</goals-against>
    			</opponent>
    	</team>
    </nba>

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    I see your code, but I don't see a question.

    What problem are you having?

  3. #3
    Join Date
    May 2009
    Posts
    60
    you probelm is in row with

    Code:
    <?xml-Stylesheet type="text/css" href="nba.css"?>
    upper the S

    firefox have probelm with the uppercase S


    i make a litlle example
    css
    Code:
    nba{
    display:block;
    width:50%;
    }
    title{
    
    }
    
    team{
    display:block;
    border:1px solid black;
    margin:5px;
    padding:10px;
    }
    wins{
    display:list-item; margin-left:15px;
    background-color:#FF0000
    }
    wins:before {
    content:'wins: ';
    font-weight:bold;}
    losses{
    display:list-item; margin-left:15px;
    background-color:#00FF00
    }
    losses:before {
    content:'looses: ';
    font-weight:bold;}
    opponent{
    display:list-item; margin-left:15px;
    }
    opponent:before {
    content:'Team: ';
    font-weight:bold;}
    location{
    display:inline; margin-left:15px;
    }
    goals-for{
    display:inline; margin-left:15px;
    }
    goals-against{
    display:inline; margin-left:15px;
    }
    xml
    Code:
    <?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <?xml-stylesheet type="text/css" href="nba.css"?>
    <nba xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="nba.xsd">
    	<title>NBA Final</title>
    	<team>LAKER
    		<wins>0</wins>
    		<losses>1</losses>
    		<opponent>Dallas
    			<location>Game1</location>
    			<goals-for>94a</goals-for>
    			<goals-against>96</goals-against>
    		</opponent>
    	</team>
    </nba>
    xsd
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
      <xs:element name="nba">
        <xs:complexType>
          <xs:sequence>
            <xs:element ref="title"/>
            <xs:element ref="team"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="title" type="xs:string"/>
      <xs:element name="team">
        <xs:complexType mixed="true">
          <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element ref="losses"/>
            <xs:element ref="opponent"/>
            <xs:element ref="wins"/>
          </xs:choice>
        </xs:complexType>
      </xs:element>
      <xs:element name="losses" type="xs:integer"/>
      <xs:element name="opponent">
        <xs:complexType mixed="true">
          <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element ref="goals-against"/>
            <xs:element ref="goals-for"/>
            <xs:element ref="location"/>
          </xs:choice>
        </xs:complexType>
      </xs:element>
      <xs:element name="goals-against" type="xs:integer"/>
      <xs:element name="goals-for" type="xs:integer"/>
      <xs:element name="location" type="xs:NCName"/>
      <xs:element name="wins" type="xs:integer"/>
    </xs:schema>
    result
    Attached Images Attached Images
    Last edited by xml-looser; 05-09-2011 at 06:17 AM.

  4. #4
    Join Date
    May 2011
    Posts
    2
    Thanks XML-Looser (sounds not right, thanks whoever bebind that)

Similar Threads

  1. XML parsing issue using Ajax/Jquery
    By nix4 in forum AJAX
    Replies: 1
    Last Post: 06-01-2010, 11:12 AM
  2. XSLT Namespace URI Issue
    By iceman316 in forum XML
    Replies: 0
    Last Post: 05-05-2009, 11:45 PM
  3. xml namespace
    By shaharpan in forum XML
    Replies: 0
    Last Post: 07-20-2005, 11:42 AM
  4. Replies: 0
    Last Post: 12-19-2000, 12:24 PM

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
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center