473,763 Members | 2,930 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error: Cannot find the declaration of element 'Receivers'

2 New Member
I seem to be having issues validating an XML document using my schema. Both are below:

The Schema:
Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  3. <xs:element name="Receivers" >
  4. <xs:complexType>
  5. <xs:choice maxOccurs="unbounded">
  6. <xs:element ref="MulticastReceiver"/>
  7. <xs:element ref="SocketHubReceiver"/>
  8. <xs:element ref="SocketReceiver"/>
  9. <xs:element ref="UDPReceiver"/>
  10. <xs:element ref="XMLSocketReceiver"/>
  11. <xs:element ref="LogFilePatternReceiver"/>
  12. </xs:choice>
  13. </xs:complexType>
  14. </xs:element>
  15. <xs:element name="MulticastReceiver">
  16. <xs:complexType>
  17. <xs:all>
  18. <xs:element ref="address"/>
  19. <xs:element ref="decoder"/>
  20. <xs:element ref="port"/>
  21. <xs:element ref="threshold"/>
  22. </xs:all>
  23. <xs:attribute name="name" use="required" type="xs:NCName"/>
  24. </xs:complexType>
  25. </xs:element>
  26. <xs:element name="address">
  27. <xs:complexType>
  28. <xs:attribute name="value" use="required" type="xs:string"/>
  29. </xs:complexType>
  30. </xs:element>
  31. <xs:element name="SocketHubReceiver">
  32. <xs:complexType>
  33. <xs:all>
  34. <xs:element ref="host"/>
  35. <xs:element ref="port"/>
  36. <xs:element ref="reconnectionDelay"/>
  37. <xs:element ref="threshold"/>
  38. </xs:all>
  39. <xs:attribute name="name" use="required" type="xs:NCName"/>
  40. </xs:complexType>
  41. </xs:element>
  42. <xs:element name="host">
  43. <xs:complexType>
  44. <xs:attribute name="value" use="required" type="xs:string"/>
  45. </xs:complexType>
  46. </xs:element>
  47. <xs:element name="reconnectionDelay">
  48. <xs:complexType>
  49. <xs:attribute name="value" use="required" type="xs:integer"/>
  50. </xs:complexType>
  51. </xs:element>
  52. <xs:element name="SocketReceiver">
  53. <xs:complexType>
  54. <xs:all>
  55. <xs:element ref="loggerRepository"/>
  56. <xs:element ref="paused"/>
  57. <xs:element ref="port"/>
  58. <xs:element ref="threshold"/>
  59. </xs:all>
  60. <xs:attribute name="name" use="required" type="xs:NCName"/>
  61. </xs:complexType>
  62. </xs:element>
  63. <xs:element name="listener">
  64. <xs:complexType>
  65. <xs:attribute name="value" use="required" type="xs:string"/>
  66. </xs:complexType>
  67. </xs:element>
  68. <xs:element name="UDPReceiver">
  69. <xs:complexType>
  70. <xs:all>
  71. <xs:element ref="decoder"/>
  72. <xs:element ref="encoding"/>
  73. <xs:element ref="loggerRepository"/>
  74. <xs:element ref="paused"/>
  75. <xs:element ref="port"/>
  76. <xs:element ref="threshold"/>
  77. </xs:all>
  78. <xs:attribute name="name" use="required" type="xs:NCName"/>
  79. </xs:complexType>
  80. </xs:element>
  81. <xs:element name="encoding">
  82. <xs:complexType>
  83. <xs:attribute name="value" use="required" type="xs:string"/>
  84. </xs:complexType>
  85. </xs:element>
  86. <xs:element name="XMLSocketReceiver">
  87. <xs:complexType>
  88. <xs:all>
  89. <xs:element ref="decoder"/>
  90. <xs:element ref="loggerRepository"/>
  91. <xs:element ref="paused"/>
  92. <xs:element ref="port"/>
  93. <xs:element ref="threshold"/>
  94. </xs:all>
  95. <xs:attribute name="name" use="required" type="xs:NCName"/>
  96. </xs:complexType>
  97. </xs:element>
  98. <xs:element name="LogFilePatternReceiver">
  99. <xs:complexType>
  100. <xs:all>
  101. <xs:element ref="fileURL"/>
  102. <xs:element ref="filterExpression"/>
  103. <xs:element ref="logFormat"/>
  104. <xs:element ref="tailing"/>
  105. <xs:element ref="timeStampFormat"/>
  106. </xs:all>
  107. <xs:attribute name="name" use="required" type="xs:NCName"/>
  108. </xs:complexType>
  109. </xs:element>
  110. <xs:element name="fileURL">
  111. <xs:complexType>
  112. <xs:attribute name="value" use="required" type="xs:string"/>
  113. </xs:complexType>
  114. </xs:element>
  115. <xs:element name="filterExpression">
  116. <xs:complexType>
  117. <xs:attribute name="value" use="required" type="xs:string"/>
  118. </xs:complexType>
  119. </xs:element>
  120. <xs:element name="logFormat">
  121. <xs:complexType>
  122. <xs:attribute name="value" use="required" type="xs:string"/>
  123. </xs:complexType>
  124. </xs:element>
  125. <xs:element name="tailing">
  126. <xs:complexType>
  127. <xs:attribute name="value" use="required" type="xs:boolean"/>
  128. </xs:complexType>
  129. </xs:element>
  130. <xs:element name="timeStampFormat">
  131. <xs:complexType>
  132. <xs:attribute name="value" use="required" type="xs:string"/>
  133. </xs:complexType>
  134. </xs:element>
  135. <xs:element name="decoder">
  136. <xs:complexType>
  137. <xs:attribute name="value" use="required" type="xs:string"/>
  138. </xs:complexType>
  139. </xs:element>
  140. <xs:element name="port">
  141. <xs:complexType>
  142. <xs:attribute name="value" use="required" type="xs:integer"/>
  143. </xs:complexType>
  144. </xs:element>
  145. <xs:element name="threshold">
  146. <xs:complexType>
  147. <xs:attribute name="value" use="required" type="xs:string"/>
  148. </xs:complexType>
  149. </xs:element>
  150. <xs:element name="active">
  151. <xs:complexType>
  152. <xs:attribute name="value" use="required" type="xs:boolean"/>
  153. </xs:complexType>
  154. </xs:element>
  155. <xs:element name="class">
  156. <xs:complexType>
  157. <xs:attribute name="value" use="required" type="xs:string"/>
  158. </xs:complexType>
  159. </xs:element>
  160. <xs:element name="loggerRepository">
  161. <xs:complexType>
  162. <xs:attribute name="value" use="required" type="xs:string"/>
  163. </xs:complexType>
  164. </xs:element>
  165. <xs:element name="paused">
  166. <xs:complexType>
  167. <xs:attribute name="value" use="required" type="xs:boolean"/>
  168. </xs:complexType>
  169. </xs:element>
  170. </xs:schema>
  171.  
The Document:
Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Receivers xmlns="receiverSchema.xsd" >
  3. <LogFilePatternReceiver name="Receiver1">
  4. <fileURL value="file:\\\C:\LogMonitorLogs\currentlog.log"/>
  5. <filterExpression value=""/>
  6. <logFormat value="TIMESTAMP LEVEL LOGGER [thread]: MESSAGE"/>
  7. <tailing value="true"/>
  8. <timeStampFormat value="dd MMM yyyy HH:mm:ss,SSS"/>
  9. </LogFilePatternReceiver>
  10. <LogFilePatternReceiver name="Receiver2">
  11. <fileURL value="file:\\\C:\LogMonitorLogs\currentlog2.log"/>
  12. <filterExpression value=""/>
  13. <logFormat value="TIMESTAMP LEVEL LOGGER [thread]: MESSAGE"/>
  14. <tailing value="true"/>
  15. <timeStampFormat value="dd MMM yyyy HH:mm:ss,SSS"/>
  16. </LogFilePatternReceiver>
  17. </Receivers>
  18.  
It tells me "Cannot find the declaration of element 'Receivers'". Can anyone help me out?

Thanks,
Matt
Feb 29 '08 #1
2 18149
jkmyoung
2,057 Recognized Expert Top Contributor
The problem is in assigning your schema. It should be like:
Expand|Select|Wrap|Line Numbers
  1. <Receivers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="receiverSchema.xsd">
  2.  
Feb 29 '08 #2
mlb5000
2 New Member
The problem is in assigning your schema. It should be like:
Expand|Select|Wrap|Line Numbers
  1. <Receivers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="receiverSchema.xsd">
  2.  
It sure is, thanks for the help.

Matt
Feb 29 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1338
by: TERMAN, IRA, ALABS | last post by:
Hello, I am trying to install Python-2.3. I get the following error when I run ./configure --with-csx=gcc on my Solaris machine. config.status: error: cannot find input file: Modules/Setup.config.in My system shows: # uname -svrm SunOS 5.8 Generic_108528-23 sun4u
2
7662
by: Liber Almeida | last post by:
I have a problem when install a Visual C#. Net application, using Crytal Reports, under Windows98: error: "cannot find KeycodeV2.dll or invalid Keycode" Help me please, Thank you, Liber Almeida.
0
400
by: Matthew Louden | last post by:
I am trying to implement the sort event in data grid. I set the data grid's AllowSorting property = True. I implement the following code that should be the event will fire when the user click any of the columns in the table: Private Sub dgReport1_SortCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridSortCommandEventArgs) Handles dgReport1.SortCommand Dim sortOrder As String = e.SortExpression.ToString()...
3
4307
by: POL8985 | last post by:
The application is developed in ASP.Net with a SQL Server database. Essentially, the application uses a single shared Connection object for all users logged into the system. The connection object is opened/closed for each transaction. The error - System.IndexOutOfRangeException: Cannot find table 0 - occurs on one page that accepts a single piece of data from a textbox. This data is then passed to the business logic classes (in...
0
2072
by: RJN | last post by:
Hi I'm having VS.Net 2003 in my development machine and report works fine in my machine. The deployment server is Windows 2003 server, it only has the framework installed. Since the framework doesn't come with crystal dlls, we need to add a few merge modules and create a setup project. We also need to enter a license key at the time of creating setup. This is all done correctly. I have run the setup on the deployment server, but the...
16
3529
by: TT (Tom Tempelaere) | last post by:
Hi all, I created an XSD to define the structure of an XML file for my project. I made an XML file linked to the XSD using XmlSpy. The problem is that if I read the file using .NET XmlDocument and then query for the root element, the result is always null (1). However if I strip the root element of all attributes generated by XmlSpy, then there is no problem to find the root element with .NET XML classes (2). (1) The XML for which...
10
7207
by: antonis | last post by:
When I restarting my pc a warning appears with the error cannot find the file C:\winnt\system32\1.tmp Please advice me how can I solve this problem Thanks
0
4569
by: SMH | last post by:
Hi All, I am currently learning .Net 2, studying for 70-528. I've hit a bit of a brick wall with DataColumn.Expression. As I understand it, this can be used to (For example) concatenate two columns to make a derived column. When I run my code, I get this error: ------------
2
15859
by: sam.barker0 | last post by:
Hi , I am having 3 functions.When I step through when func b returns to funca.it throws an error "cannot find function bounds" funca() { .... ... funcb(); }
0
9992
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9935
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9819
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8821
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7364
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5268
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3519
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2790
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.