470,855 Members | 1,157 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,855 developers. It's quick & easy.

Specifying the xsd:param value

Hello All,

I have an xml element namely
<csharpAttr>"[DllImport("user32.dll", SetLastError=false,
ExactSpelling=false)]"</csharpAttr>
the value of tha element could be anything for example
<csharpAttr>"[Conditional("DEBUG"), Conditional("TEST1")]"
</csharpAttr>
now I want to create a schema for this "charpAttr" element .
So the idea is the value should always start with a "[" and end with
"]"
So how do I specify the
pattern value
in the following
<xs:simpleType name="charpAttrType">
<xs:restriction base="xs:string">
<xs:pattern value= ???????/>
</xs:restriction>
</xs:simpleType>
Or if any body could suggest an alternate way (probably a better way)
that would be awesome.
Thanks in advance
sP

Aug 18 '06 #1
2 1046
sp*****@gmail.com wrote:
Hello All,

I have an xml element namely
<csharpAttr>"[DllImport("user32.dll", SetLastError=false,
ExactSpelling=false)]"</csharpAttr>
the value of tha element could be anything for example
<csharpAttr>"[Conditional("DEBUG"), Conditional("TEST1")]"
</csharpAttr>
now I want to create a schema for this "charpAttr" element .
So the idea is the value should always start with a "[" and end with
"]"
But it doesn't. Your first example starts and ends with a double-quote.
Your second example starts with a double-quote and ends with a newline
(white-space). If you declare the element content to start and end with
square brackets, both your examples will be invalid.

///Peter
--
XML FAQ: http://xml.silmaril.ie/
Aug 20 '06 #2
Thanks Peter,

I think its just issue the way its displayed here in the groups. Both
my samples end with double quotes

<csharpAttr>"[DllImport("user32.dll", SetLastError=false,
ExactSpelling=false)]"</csharpAttr>

<csharpAttr>"[Conditional("DEBUG"), Conditional("TEST1")]">
</csharpAttr>.

Now how do I specify the pattern value?

sp*****@gmail.com wrote:
Hello All,

I have an xml element namely
<csharpAttr>"[DllImport("user32.dll", SetLastError=false,
ExactSpelling=false)]"</csharpAttr>
the value of tha element could be anything for example
<csharpAttr>"[Conditional("DEBUG"), Conditional("TEST1")]"
</csharpAttr>
now I want to create a schema for this "charpAttr" element .
So the idea is the value should always start with a "[" and end with
"]"
So how do I specify the
pattern value
in the following
<xs:simpleType name="charpAttrType">
<xs:restriction base="xs:string">
<xs:pattern value= ???????/>
</xs:restriction>
</xs:simpleType>
Or if any body could suggest an alternate way (probably a better way)
that would be awesome.
Thanks in advance
sP
Aug 21 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Codex Twin | last post: by
3 posts views Thread by oziris | last post: by
3 posts views Thread by R.Schuetze | last post: by
reply views Thread by Jason S | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.