473,387 Members | 1,863 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,387 software developers and data experts.

designing a class library that uses .xsd files

I need to move some code which at present is residing in some .aspx
codebehind files into a separate class library.

One of the functions makes use of an xml schema to create the structure
for a DataSet object which is returned to the caller. Currently the
schema is stored in an .xsd file which exists in the /schemas folder
underneath the root of the website.

If I were to move this function into a class, I'm unsure of the correct
way I should be accessing the .xsd file. The class needs to be portable
and so mustn't assume that it's running as part of a web app and thus
shouldn't look in the /schemas folder.

Am I right in thinking that the only way is to distribute the .xsd file
with the .dll used for the new class library I intend to create.

Wayne.

Jul 21 '05 #1
2 2070
sounds like a simple design problem.

When extracting the code into your dll from the code-behind, change is
slightly to take either the XSD file's filename, or a stream containing the
XSD file. The calling code will get that responsibility, while the called
code will simply use the passed information to perform the necessary
activities.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"wh1974" <wa***@pyesmeadow.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I need to move some code which at present is residing in some .aspx
codebehind files into a separate class library.

One of the functions makes use of an xml schema to create the structure
for a DataSet object which is returned to the caller. Currently the
schema is stored in an .xsd file which exists in the /schemas folder
underneath the root of the website.

If I were to move this function into a class, I'm unsure of the correct
way I should be accessing the .xsd file. The class needs to be portable
and so mustn't assume that it's running as part of a web app and thus
shouldn't look in the /schemas folder.

Am I right in thinking that the only way is to distribute the .xsd file
with the .dll used for the new class library I intend to create.

Wayne.

Jul 21 '05 #2
Thank you for your suggestion.

Before I implement this change in the design, what are your thoughts of
including the .xsd file as a resource embedded in the assembly?

Thanks once again,
Wayne.

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: shailesh kumar | last post by:
Hi, I need to design data interfaces for accessing files of very large sizes efficiently. The data will be accessed in chunks of fixed size ... My data interface should be able to do a random...
6
by: E G | last post by:
Hi! I am having problems in designing a class. First, I have a base class that allocates a 3D data set and allows some other mathematical operations with it, something like this: template...
12
by: James Brown | last post by:
Hi all, Having problems designing a template-class. I'll describe my scenario first then show what I've come up with so far: Need a class to provide pointer/array-like access to an area of...
14
by: Mick | last post by:
I wrote a C# program that interfaces with a data vendor over the web using an API they supplied and their examples in C#. Now I have another data vendor's API and example that I want to add to...
9
by: Codex Twin | last post by:
Hi I have a common model for a Data Access Layer scenario. I have an abstract base class, called DalBase which contains a list of abstract methods. Lets call them: public abstract void Shine();...
7
by: TJ | last post by:
In C# how do you achieve pass-by-reference property declarations in the Type Library? I am writing a COM Class Library that must mimick an existing library for which the only information is the...
2
by: wh1974 | last post by:
I need to move some code which at present is residing in some .aspx codebehind files into a separate class library. One of the functions makes use of an xml schema to create the structure for a...
7
by: Peter Bradley | last post by:
OK. A bit behind the times, I know; but we're just moving over to .NET 2.0. How on earth do you manage configuration settings in a class library in .NET 2.0? In version 1.1, we used a handy class...
12
by: Janaka Perera | last post by:
Hi All, We have done a object oriented design for a system which will create a class multiply inherited by around 1000 small and medium sized classes. I would be greatful if you can help me...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...

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.