Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Specifying the xsd:param value

Reply
Thread Tools

Specifying the xsd:param value

 
 
spasala@gmail.com
Guest
Posts: n/a
 
      08-18-2006
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">
<xsattern 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

 
Reply With Quote
 
 
 
 
Peter Flynn
Guest
Posts: n/a
 
      08-20-2006
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/
 
Reply With Quote
 
 
 
 
spasala@gmail.com
Guest
Posts: n/a
 
      08-21-2006
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?



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">
> <xsattern 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Specifying an empty asp.net configuration application setting value valentin tihomirov ASP .Net 0 09-14-2007 08:32 AM
Specifying a defualt value for the parameters in a method kingfox C++ 6 05-12-2007 04:14 PM
Retreiving Parent Values by specifying a attribute value pathisunil@gmail.com XML 0 05-10-2005 04:50 PM
Dynamically specifying an anchor and name/value pairs Astra ASP General 2 03-11-2005 04:00 PM
Specifying generics in configuration valentin tihomirov VHDL 14 01-07-2004 05:27 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57