473,403 Members | 2,071 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,403 software developers and data experts.

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:#inLineSchema">
* * <Schema name="inLineSchema"
targetNamespace="http://www.plmxml.org/Schemas/PLMXMLSchema"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:plm="http://www.plmxml.org/Schemas/PLMXMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
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 3923
Matt McMinn <me*****@chartermi.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:#inLineSchema">
* * <Schema name="inLineSchema"
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:schemaLocation="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
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...
1
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...
0
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...
1
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...
8
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"...
2
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...
1
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
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...
3
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
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...
0
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...
0
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...

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.