473,394 Members | 1,658 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 1120
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ray Tayek | last post by:
hi, trying to convert some csv files into xsml and pulling a few hairs out :(. using the files below. a java program will parse the csv and take care of strange names and notes that line breaks in...
2
by: monsterpot | last post by:
Hello, I have a document like this: <parameters> <param ptype="init">somedata</param> <param ptype="process">moredata</param> <param ptype="kill">alsodata</param> </parameters> <param> has...
2
by: David Muoio | last post by:
I am trying to validate an XML file against an XSD that is stored in the assembly as an embedded resource. I can get it to work as long as the XSD does not include other XSDs. After a fair amount...
0
by: Codex Twin | last post by:
hello group: The following is a fragment from a schema which defines the EWethnicCategoryStructure type. As you can see, its type is defined by the SimpleType enumeration EWethnicCategoryType....
5
by: LS | last post by:
Can a WebMethod return an Interface type? Can we pass an interface parameter ? Example : public interface IEntity { long Id { get; set; } string Name { get; set; } }
3
by: oziris | last post by:
hi ! I would like to write a schema for this kind of XML document <request> <params> <param1>foo</param1> <pouet>foo</pouet> <truc>bidule</truc> </params>
3
by: R.Schuetze | last post by:
Hallo, I'm working on an XSD schema for an 3D Point. The XML struktur of the point is the following: <Point name="6" target="Retro" type="TP" unit="m"> <param name="X" value="0.000"/> <param...
1
by: soccerdad | last post by:
I've got a class hierarchy generated from a .xsd schema file using the XSD.EXE tool. One of the elements will have its "inner text" set to a CDATA block. The XSD.EXE tool exposed a "Value" property...
0
by: Jason S | last post by:
I'm using RELAX NG but my question is about XSD datatypes. Is there any way to combine patterns? Right now I have this: (a chain of identifiers, the first being strict e.g. starting w/ letter or...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.