468,514 Members | 1,690 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,514 developers. It's quick & easy.

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.xml". But I do have the schema for it and an XSLT
transformation on it that would create a new xml from "original.xml"
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.xml" 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 1231
M Ali wrote:
I am in a situation where I don't have access to an xml, say
"original.xml". But I do have the schema for it and an XSLT
transformation on it that would create a new xml from "original.xml"
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Robert Jacobson | last post: by
2 posts views Thread by PeterW | last post: by
8 posts views Thread by Phil Lee | last post: by
1 post views Thread by vidarno | last post: by
4 posts views Thread by Mike Logan | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.