473,624 Members | 2,249 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Inline Schema

I'm trying to have an XML file validate against an inline schema. The
declarations follow:

<PLMXML xmlns="http://www.plmxml.org/Schemas/PLMXMLSchema"
xmlns:data="x-schema:#inLineS chema">
* * <Schema name="inLineSch ema"
targetNamespace ="http://www.plmxml.org/Schemas/PLMXMLSchema"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:plm="http ://www.plmxml.org/Schemas/PLMXMLSchema"
elementFormDefa ult="qualified"
attributeFormDe fault="unqualif ied"
xml:lang="en">
.....
</Schema>
</PLMXML>

The rest of the schema, and the XML file follow this. If the schema is in a
seperate file, and I reference it from within the XML file, it validates
fine. If I put the schema file inline like this, I get a "cannot find the
declartion of element PLMXML error". I'm assuming that I'm calling the
schema incorrectly - can anyone show me the right way?

Thanks

Matt
Jul 20 '05 #1
1 3953
Matt McMinn <me*****@charte rmi.net> writes:
I'm trying to have an XML file validate against an inline schema. The
declarations follow:

<PLMXML xmlns="http://www.plmxml.org/Schemas/PLMXMLSchema"
xmlns:data="x-schema:#inLineS chema">
* * <Schema name="inLineSch ema"
targetNamespace ="http://www.plmxml.org/Schemas/PLMXMLSchema"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"


Unfortunately support for inline schemas varies widely between
validators -- which one are you using?

Also note that there appear to be at least three bugs visible above
regardless of validator:

1) Schema should be schema
2) Either schema should be xsd:schema, or xsd:xmlns=... should be
xmlns=...
3) name=... should be id=...

Also, unless that xmlns:data is some magic for some schema validator
I'm not aware of, you need a
xsi:schemaLocat ion="http://www.plmxml.org/Schemas/PLMXMLSchema
#inLineSchema" on your PLMXML element.

ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
Jul 20 '05 #2

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

Similar topics

0
1312
by: Morten W. Petersen | last post by:
Hi, I'm developing a validation schema for a new thing called extensible open xhtml outlines (XOXO) . I'd like to include inline XHTML elements in these outlines, and do the least amount of work possible to get it working. :) I've done some work on the schema, are there ways easily include inline elements in the li elements?
1
1439
by: martin | last post by:
Are inline schema (i.e a schema included in the XML document) compliant with the W3C recommendations on schema? I keep reading about them in .net articles on webservices. I don't understand how this can be the a valid approach, as far as I know the only way to include information on the structure of an XML document is by enclosing the DTD in the XML document. Am I missing something or is this just a MS approach of XML?
0
1242
by: martin | last post by:
Coming across inline schema (i.e an XML instance with the schema incorporated a rootelement that is not defined in the schema) Trying to figure out how this can be parsed apparently I run into any information on how this is allowed within the specs of either XML and Schema. Or is this just a fundamental non-compliancy to W3C standards?
1
1587
by: Andreas Palm | last post by:
Hi there, I do have a dataset which I use to write a XML file with inline schema. A second application should use a XmlvalidatingReader to read the xml file again. Now I get errors like: The 'http://tempuri.org/LicenceFile.xsd:LicenceData' element is not declared.
8
6506
by: aevans1108 | last post by:
Greetings I can't seem to inherit enumerated values from a globally defined type in my XML schema. XmlSchema.Compile() doesn't like it. Here's the schema. <?xml version="1.0" encoding="UTF-8" ?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
2
3222
by: Edward Diener | last post by:
I could not find an example of an inline XSD schema for an XML document which has no namespaces. Could someone supply one ? When I tried validating my XML with an inline XSD schema, using XmlDocument.Load on a validating reader set to System.Xml.ValidationType.Auto, it failed and I do not know why. My XML is: <?xml version='1.0'?> <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'> <xs:element name='Employee'>
1
1264
by: madhumadala | last post by:
Hi, I have an xml file with inline xsl when i try to validate with the schema it is throuing lot of errors is there any way to do this if i remove xsl and validate, it is woring fine Thanks
1
1666
by: cidney001 | last post by:
Hi, I am trying to create a schema with an inline schema in it. I have looked for a simple example of how to do this but i can't find one. I have included 2 simple schemas. How would i make the DataTypes.xsd as an inline schema within the Vendor.xsd --- DataTypes.xsd --- <?xml version="1.0"?> <xsd:schema xmlns:ardt="urn:AR:DataTypes" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:AR:DataTypes" version="1.1">...
3
4150
by: Rob | last post by:
Hi. I have XML data that I want to be more user-friendly when its opened in excel. I have been just trying to get excel to recognise an inline schema to do very basic formatting - as in for it to know recognise its datatype etc..- is this possible in the Excel? Any information regarding this would be very helpful as I'm trying to research which would be the best way to implement this - and an inline schema seems the most straightforward....
0
8233
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
8619
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...
0
8474
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
7158
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...
0
5561
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
4078
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
4173
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1784
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1482
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.