This question has been asked before but none of the solutions have worked for me.
Below is an exact question but the solution didn't worked for me.
Here's the problem.
I have the following XML file.
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="xsl/excerpt.xsl"?>
<category xmlns="http://www.w3schools.com/RedsDevils"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="excerpt.xsd">
<article>
<title>Why We Eat Too Much (and Why Kids Say They Hate Foods They Love)</title>
<excerpt>It's normal for us to stuff our faces over the holidays-normal, if not ideal. The Guardian points out the science behind why we eat so much even when we're full, and answers the puzzling question of why kids suddenly say they don't like a food they definitely do.</excerpt>
<author>Melanie Pinola</author>
<date>Dec 20, 2013, 11.00 PM GMT</date>
<thumbnail>img/food.jpg</thumbnail>
<link>article1.xml</link>
</article>
<article>
<title>Why We Eat Too Much (and Why Kids Say They Hate Foods They Love)</title>
<excerpt>It's normal for us to stuff our faces over the holidays-normal, if not ideal. The Guardian points out the science behind why we eat so much even when we're full, and answers the puzzling question of why kids suddenly say they don't like a food they definitely do.</excerpt>
<author>Melanie Pinola</author>
<date>Dec 20, 2013, 11.00 PM GMT</date>
<thumbnail>img/food.jpg</thumbnail>
<link>article1.xml</link>
</article>
<article>
<title>Why We Eat Too Much (and Why Kids Say They Hate Foods They Love)</title>
<excerpt>It's normal for us to stuff our faces over the holidays-normal, if not ideal. The Guardian points out the science behind why we eat so much even when we're full, and answers the puzzling question of why kids suddenly say they don't like a food they definitely do.</excerpt>
<author>Melanie Pinola</author>
<date>Dec 20, 2013, 11.00 PM GMT</date>
<thumbnail>img/food.jpg</thumbnail>
<link>article1.xml</link>
</article>
<article>
<title>Why We Eat Too Much (and Why Kids Say They Hate Foods They Love)</title>
<excerpt>It's normal for us to stuff our faces over the holidays-normal, if not ideal. The Guardian points out the science behind why we eat so much even when we're full, and answers the puzzling question of why kids suddenly say they don't like a food they definitely do.</excerpt>
<author>Melanie Pinola</author>
<date>Dec 20, 2013, 11.00 PM GMT</date>
<thumbnail>img/food.jpg</thumbnail>
<link>article1.xml</link>
</article>
</category>
I am trying to apply the following schema file to above XML file.
<?xml version="1.0" encoding="utf-8"?>
<xs:schema targetNamespace="http://www.w3schools.com/RedsDevils"
elementFormDefault="qualified"
xmlns="excerpt.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="category">
<xs:complexType>
<xs:sequence>
<xs:element name="article" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string" minOccurs="1" />
<xs:element name="excerpt" type="xs:string" minOccurs="1" />
<xs:element name="author" type="xs:string" minOccurs="0" />
<xs:element name="date" type="xs:string" minOccurs="0" />
<xs:element name="thumbnail" type="xs:string" minOccurs="1" />
<xs:element name="link" type="xs:string" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
But its not working. I don't see any errors just the blank page.
Can anyone please help me with this?
Right now both XML and XSD files are in the same directory but I want to move the XSD file to XSD folder. What changes would I have to make for this?
Thanks in advance.