473,663 Members | 2,838 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to generate a schema from XSL? (Difficult)

Hi,

I am in a situation where I don't have access to an xml, say
"original.x ml". But I do have the schema for it and an XSLT
transformation on it that would create a new xml from "original.x ml"
called "transform.xml" .

What i need is the schema for the "transform.xml" . I could generate
the schema from the xml if I had "transform.xml" . But I don't have
access to "original.x ml" so I cannot apply the transform to get
"transform.xml" .

So, it boils down to being able to generate a schema from an xsl file,
where we also have the schema of the xml on which the transform will
happen but do not have the xml itself.

Has anyone ever done this? What would be the best way of doing this?

I am thinking of parsing the xsl for this, if so, can i achieve the
objective using dotnet classes?

Thanks...

Regards,
Ali
Nov 12 '05 #1
1 1418
M Ali wrote:
I am in a situation where I don't have access to an xml, say
"original.x ml". But I do have the schema for it and an XSLT
transformation on it that would create a new xml from "original.x ml"
called "transform.xml" .

What i need is the schema for the "transform.xml" .


I don't think it's feasible. XSLT is Turning-complete language and can
transform document in any way, in many ways conditionally. Moreover
usually transformation result more depends on source XML than on
stylesheet logics.

If you have a schema for original.xml, you can generate sample
original.xml and transform it.
--
Oleg Tkachenko [XML MVP, MCP]
http://blog.tkachenko.com
Nov 12 '05 #2

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

Similar topics

0
2411
by: Almoni | last post by:
Hi, I have a few .xsd files that include each other in the following way: <!-- lets call the main schema file AA.xsd and it includes BB.xsd inside it --> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
5
2015
by: MarjaR | last post by:
For my application I need to develop an interface with an external organisation, based on XMLHTTP messaging. Depending on the specific purpose of the communication, this external organisation will send me various XML schemas (XSD documents) specifying the structure for the message interfaces. I need to be able to interpret these XSD documents and dynamically generate my database structure based on that. But... I don't have a clue...
0
1742
by: Robert Jacobson | last post by:
Hi, I have a number of classes in one assembly. I'd like to use XSD.exe to generate a schema for just one class ("Parse Rules") and its nested child classes. Is there an attribute that will allow me to do this? I tried running XSD on the entire assembly, with the plan to delete the unnecessary classes from the .xsd afterwords. However, it complained that a certain class "cannot be serialized because it does not have a default...
2
6925
by: PeterW | last post by:
I have an xml file from which I want to generate an xsd schema and at a later stage a cs class. The xml file has a mix of defined namespaces and also an empty namespace. These are defined as follows: <silcn:silcn xmlns:silcn='http://silcn.org/200309' xmlns='http://xmlprobe.com/200312'> it contains an element <report> off the root and also a separate <Silcn:report> again off the root.
1
4174
by: comic_rage | last post by:
Hi, I am writing code with C# to generate xml schema, however, the following code generate a UTF-16 in the first line. This will create some problems. How can get the code/missing what part of the code in C# to generate a first line with UTF-8 instead of UTF-16? Thanks, public XmlSchema CreateSchemaRoot()
8
6453
by: Phil Lee | last post by:
I'm sure this is possible but I just can't see how to do it. I want to add schemas to my solution and have C# classes automatically generated from them. I can see how to generate typed DataSet's with the MSDataSetGenerator custom tool. Is there something similar for simple schemas? Regards Phil Lee
1
1274
by: vidarno | last post by:
Hi! I'm working on a simple xml editor in Java at the moment. It's purpose is to enable the user to store information about typically collected types of posessions, like books, movies (DVDs) and music (CDs). I want the program to be able to accept various forms of posessions, so if I later create a new
4
17399
by: Mike Logan | last post by:
I would like to dynamically create a Visio diagram from .Net. I tried looking at the Visio SDK, but the samples are extremely convoluted for me to understand. Does someone have an example of creating a basic drawing with two shapes connected? I can then expand that example to include other elements. Also, my plan is for this project to be an ASP.Net website. Is Visio required to be on the web server in order to generate the Visio...
0
1378
by: mmaslar | last post by:
Can Visual Studio ('05 or '08) generate a WSDL file with an external Schema file? eg. Instead of placing the schema within the WSDL file, generate it in a separate XSD file? In other words... When I browse to the WSDL (http://localhost:4444/WebService1.asmx?wsdl) the schema is inline. I'd like it to be external. Any way of doing that? Yes I know the net result is the same, but this WSDL will become the "contract" for other systems -- and an...
0
8436
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8345
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8858
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8548
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
5657
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4182
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
4349
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2763
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2000
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.