473,672 Members | 2,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

matching schema and xml with Xslt- pls help

3 New Member
Hi, there..

could you please show me some examples of XSLT codes to match
XSD with XML .. the stylesheet should output Yes if matches the schema and No if doesn't match..

schema contains empty Complex type, sequence, choice and elements (no elements type/ attribute/ strings and no text in xml)

we can include if statements, recursions, choices and apply templets in stylesheet but HOwww..

pleeeeeeeeeeese help

thanks
Nov 29 '07 #1
4 1232
jkmyoung
2,057 Recognized Expert Top Contributor
Is there a particular reason you're doing this with xslt?
This would be a somewhat lengthy process, eg would take more than a few posts.

Why not just use a normal xml validator?
Nov 29 '07 #2
a1suria
3 New Member
oh.. ye.. i know.. sorry..ehm.. i just started to learn xml..part of my coursework requirements..i have to match schema with xml there is no text/attribute either in schema/xml

i dont know how i can apply IF statement (recursion&choi ce) to output yes/no..

Can you Write me One IF statement & choice statement to process wheather xml matching the schema structure?

thanks for responding
Nov 30 '07 #3
a1suria
3 New Member
hello sir..

Could you please help me.. deadline is this week..

please show me sample codes to match/validate with xsd...

thank u
Dec 2 '07 #4
jkmyoung
2,057 Recognized Expert Top Contributor
http://www.w3schools.com/xsl/xsl_choose.asp
If this is not enough, could we see the problem with your current code?
Dec 3 '07 #5

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

Similar topics

6
2485
by: Pieter | last post by:
I've read a lot of posts on "why relax ng is so very good" and on "why w3c xml schema should be the only schema language". I'm, however, still not clear on why I should prefer one over the other. I've made a small list of some good and bad points of both. These points don't really go into the grammar aspects of these languages, but are more about secondary aspects. The grammar aspects are different, but both are suitable for validating...
0
1395
by: Andy Dingley | last post by:
I'm writing XSLT to transform fntg-schema (our own project's document schema) into PartnerML, a HTML-like XML dialect used for mobile phones. I'm using XMLSPy 4.4 to do this. The schema for PartnerML is supplied in several modules, brought together by <xs:include> and <xs:import> statements. My understanding (and experiment) suggests that XMLSpy can't work with such a modularized schema. As a result, my XSLT documents have a header...
0
2178
by: Adam Retter | last post by:
Hi Guys, I have a need to create a html form based on my schema. I initially decided to do this using xql, have got some way but am finding this difficult (it may be as I am very new to xql). The html form needs to be dynamically generated from the schema as the schema may change in future. We need the forms to provide a UI for users to edit the underlying xml documents represented by the schema. Im wandering if there is an easy way...
4
1592
by: Porthos | last post by:
Hi All, I've been working on mining data from a schema file (all attribute data so far) and have come to the point where I need to get information that is contained in tags. For instance, <tag>My Data Here</tag>. I've tried using the <xsl:value-of select="tag"/> element, but it does not appear to work in schema files. Is this correct? Is there another way to get at this data? -James
1
1223
by: thijs.kupers | last post by:
Hi Anyone knows where I can find the xml-schema of xslt? thanks...
0
1258
by: marcum williams | last post by:
Below I'm generating an updategram via xslt and currently referencing schema via <updg:sync mapping-schema="hpXSD.xsd"> .... </updg:sync> But I would like to LOAD the .xsd schema into memory and APPLY to the updategram in memory. Tried using XmlValidatingReader but couldn't get it to work. Thanks
4
3588
by: David S. Alexander | last post by:
I am trying to transform XML to XML using an XSLT in C#, but the root node of my XML is not being matched by the XSLT if it has an xmlns attribute. Am I handling my namespaces incorrectly? My C# code is, // Create an XSLT transform object XslTransform xslTransform = new XslTransform(); // Load the stylesheet
2
1110
by: parth | last post by:
I have the following XML file - <root> <book> <section>art</section> <title>abc</title> <author>mark</author> </book> <book> <section>science</section>
5
7270
by: hello | last post by:
How can I define the schema so that myage element has to be double or null? <xs:simpleType name="myage"> <xs:restriction base="xs:double"> <xs:enumeration value="null"/> </xs:restriction> </xs:simpleType> </xs:schema>
9
3008
by: mstilli | last post by:
Hi, I am trying to use schema for server side validation using xerces to catch the validation errors. validating this XML: <Content4> <textarea13></textarea13> <binaryobject3></binaryobject3>
0
8506
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
8948
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...
0
8852
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
8649
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
8701
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...
1
6261
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
5725
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();...
1
2847
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
3
1843
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.