<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>DevX.com Forums - XML</title>
		<link>http://forums.devx.com/</link>
		<description>SOAP, Schema, WSDL, XAML, etc.</description>
		<language>en</language>
		<lastBuildDate>Tue, 21 May 2013 08:25:23 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://forums.devx.com/images/misc/rss.png</url>
			<title>DevX.com Forums - XML</title>
			<link>http://forums.devx.com/</link>
		</image>
		<item>
			<title>XML Schema for Reading Matrices</title>
			<link>http://forums.devx.com/showthread.php?185235-XML-Schema-for-Reading-Matrices&amp;goto=newpost</link>
			<pubDate>Mon, 06 May 2013 14:06:50 GMT</pubDate>
			<description><![CDATA[Hi, 

I am very new to using XML and making my first XML Schema. I want to write something in XML schema that will allow me to read a matrix. For example, I want to have a matrix that looks like this:


HTML:
---------
<matrix >
  <row >2.1 3.4</row>
  <row >100.5 6.7</row>
  <row >-2.76 5.9</row>
  <row >-7.53 -30.21</row>
</matrix>
---------
All the values in this matrix will be decimals (no limits) and there will only be 2 values in each row. In addition, there is no restriction on the number of rows so when I am reading the XML, I want to continue reading until the last row is read. How will I write an XML schema that will allow me to verify this? 
So far I have got something like: 



Code:
---------
<xs:element name="row" type="valuelist">
<xs:simpleType name="valuelist">
  <xs:list itemType="xs:decimal"/>
</xs:simpleType>
---------

I think this will allow me to read a row, but it doesn't let me place a limit of only 2 values in a row. And how would I read all the rows in a matrix?

Thanks for your help!
Alisha]]></description>
			<content:encoded><![CDATA[<div>Hi, <br />
<br />
I am very new to using XML and making my first XML Schema. I want to write something in XML schema that will allow me to read a matrix. For example, I want to have a matrix that looks like this:<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">HTML Code:</div>
	<hr /><code class="bbcode_code"><span style="color:#000080">&lt;matrix &gt;</span><br />
&nbsp; <span style="color:#000080">&lt;row &gt;</span>2.1 3.4<span style="color:#000080">&lt;/row&gt;</span><br />
&nbsp; <span style="color:#000080">&lt;row &gt;</span>100.5 6.7<span style="color:#000080">&lt;/row&gt;</span><br />
&nbsp; <span style="color:#000080">&lt;row &gt;</span>-2.76 5.9<span style="color:#000080">&lt;/row&gt;</span><br />
&nbsp; <span style="color:#000080">&lt;row &gt;</span>-7.53 -30.21<span style="color:#000080">&lt;/row&gt;</span><br />
<span style="color:#000080">&lt;/matrix&gt;</span></code><hr />
</div> All the values in this matrix will be decimals (no limits) and there will only be 2 values in each row. In addition, there is no restriction on the number of rows so when I am reading the XML, I want to continue reading until the last row is read. How will I write an XML schema that will allow me to verify this? <br />
So far I have got something like: <br />
<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">&lt;xs:element name=&quot;row&quot; type=&quot;valuelist&quot;&gt;<br />
&lt;xs:simpleType name=&quot;valuelist&quot;&gt;<br />
&nbsp; &lt;xs:list itemType=&quot;xs:decimal&quot;/&gt;<br />
&lt;/xs:simpleType&gt;</code><hr />
</div> <br />
I think this will allow me to read a row, but it doesn't let me place a limit of only 2 values in a row. And how would I read all the rows in a matrix?<br />
<br />
Thanks for your help!<br />
Alisha</div>

 ]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?113-XML">XML</category>
			<dc:creator>ay.a1234</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?185235-XML-Schema-for-Reading-Matrices</guid>
		</item>
	</channel>
</rss>
