Restrict Element to URL

Ozzytorrent

New Member
I have this existing XSD and it's trying to restrict a value to a URL but it's not working. The id is blank and the document still validates. It also validates when I enter in any text.\[code\]<xsd:schema xmlns:atom="http://www.w3.org/2005/Atom" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/2005/Atom" elementFormDefault="qualified" attributeFormDefault="unqualified">...<xsd:complexType name="feedType"><xsd:choice minOccurs="3" maxOccurs="unbounded"> <xsd:element name="id" type="atom:idType" minOccurs="1" maxOccurs="1"/>...<xsd:complexType name="idType"> <xsd:annotation> <xsd:documentation> The Atom id construct is defined in section 4.2.6 of the format spec. </xsd:documentation> </xsd:annotation> <xsd:simpleContent> <xsd:extension base="xsd:anyURI"> <xsd:attributeGroup ref="atom:commonAttributes"/> </xsd:extension> </xsd:simpleContent></xsd:complexType>\[/code\]............\[code\]<feed xmlns="http://www.w3.org/2005/Atom" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2005/Atom ../XMLschemas/atom/2005/v/0.2/atom.xsd"> <id>https://mydomain.com</id>\[/code\]
 
Back
Top