XML problem with url value &F&

G

gg

I specify the Url element as
<xsd:element name="Url">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="512"/>
<xsd:pattern value="http://[a-zA-z.\\_\-]+"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
in the xsd but When I use the following in the xml

<Url>https://www.xyz.com/cgi-bin/access/abccgi3m01?F6=1\&F7=IB&F21=IB&F22=IB
&REQUEST=ClientSignin&LANGUAGE=ENGLISH</Url>


I got the error message
The reference to entity "F7" must end with the ';' delimiter. [17]
so I tried surrounding the url with double quote, then tried \ before &f7
but no luck. even \\&f7 did not help

tried google on a number of search terms but no luck so far
 
S

Simon Brooke

I specify the Url element as
<xsd:element name="Url">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="512"/>
<xsd:pattern value="http://[a-zA-z.\\_\-]+"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
in the xsd but When I use the following in the xml
&REQUEST=ClientSignin&LANGUAGE=ENGLISH</Url>


I got the error message
The reference to entity "F7" must end with the ';' delimiter. [17]
so I tried surrounding the url with double quote, then tried \ before
&f7 but no luck. even \\&f7 did not help

The (traditional) use of ampersand as a parameter-value pair separator in
URLs is a mistake. Many (but not all) dynamic content toolkits allow the
use of other characters, for example semi-colon, which do not provoke this
problem. However, if you must use ampersand, the correct way of writing
ampersand in an XML document is '&amp;'. So you will find that

<Url>https://www.xyz.com/cgi-bin/access/abccgi3m01?F6=1\&amp;F7=IB&amp;F21=IB&amp;F22=IB
&amp;REQUEST=ClientSignin&amp;LANGUAGE=ENGLISH</Url>

will work.

--
(e-mail address removed) (Simon Brooke) http://www.jasmine.org.uk/~simon/

;; 'I think we should trust our president in every decision
;; that he makes and we should just support that'
;; Britney Spears of George W Bush, CNN 04:09:03
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top