473,385 Members | 1,606 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,385 software developers and data experts.

XML schemas, including arbitrary elements

Hi,
I'm writing an XML schema for a format that should allow entire XSL
stylesheets to be embedded within a particular element.

Example:

<cxl xmlns="http://www.mynamespace.com/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<document>
<name>My document</name>
<transform pattern=".*\.xml">
<xsl:stylesheet>
<!-- Stylesheet -->
</xsl:stylesheet>
</transform>
</document>
</cxl>

Now there are two problems:

1) My input documents must be validated against a schema.
2) There is no schema for XSL.

I've looked at <xsd:any> but "any" elements still have to be declared in
another schema.

Basically what I want is for validation to be temporarily "suspended" within
particular elements, so as to allow inclusion of structures for which there
is no schema. Is this possible?
Thanks
-Laurens
Jul 20 '05 #1
2 1413


Laurens wrote:
I'm writing an XML schema for a format that should allow entire XSL
stylesheets to be embedded within a particular element.

Example:

<cxl xmlns="http://www.mynamespace.com/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<document>
<name>My document</name>
<transform pattern=".*\.xml">
<xsl:stylesheet>
<!-- Stylesheet -->
</xsl:stylesheet>
</transform>
</document>
</cxl>

Now there are two problems:

1) My input documents must be validated against a schema.
2) There is no schema for XSL.

I've looked at <xsd:any> but "any" elements still have to be declared in
another schema.


No, you can specify
<xsd:any processContents="skip"
which then means the parsers skips the content when validating.
Or you can use
<xsd:any processContents="lax"
to let the parser validate the content if a schema is present and
otherwise skip the content.
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

"Martin Honnen" <ma*******@yahoo.de> wrote in message
news:3f********@olaf.komtel.net...
No, you can specify
<xsd:any processContents="skip"
which then means the parsers skips the content when validating.
Or you can use
<xsd:any processContents="lax"
to let the parser validate the content if a schema is present and
otherwise skip the content.


OK, thanks! I didn't know about processContents. (I'm a Schema newbie and it
shows.) Will try this out.

Thanks again
-Laurens
Jul 20 '05 #3

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

Similar topics

0
by: Zombie | last post by:
Hi, I am looking for an XML schema design which provides version compatiblity between schemas. My schema has to evolve over time. Newer versions of the schema would be created by the addition of...
6
by: COHENMARVIN | last post by:
I'm just starting out in XML for my business, and already I'm given a large and complicated XML schema. If I write XML files based on the schema, is there any tool that 1. Tells me if I'm valid...
0
by: kyancy | last post by:
Hello All. We have several XML schemas to describe common component document parts. We then create new XML schemas as necessary that use "xsd:import schemaLocation=whateverLocation.." to include...
1
by: Steve George | last post by:
Hi, I have a scenario where I have a master schema that defines a number of complex and simple types. I then have a number of other schemas (with different namespaces) where I would like to reuse...
3
by: Matt Frame | last post by:
I am just starting to work with Schemas and VB.Net. I created a simple schema with a structure of a top level group, then inside that group I have sub-groups and elements and within the sub-groups...
4
by: anonymous | last post by:
When I use the schema collection to apply many schemas to one XML instance document, I get an error if I do not qualify every element with the appropriate namespace. Both the W3C site and this...
2
by: Darrell Plank | last post by:
I'm a real XML novice, but my ultimate goal here is to get a workable schema for the GEDCOM XML format as spec'ed out here: http://www.familysearch.org/GEDCOM/GedXML60.pdf It's a proposed XML...
5
by: Arndt Jonasson | last post by:
I have a schema defining the input of a particular application. Let's refer to the namespace for my schema by the prefix "my:". Now the need has arisen to annotate such input documents with foreign...
2
by: Roy Chastain | last post by:
I have some 'base' schema definitions that are going to be in several projects in the future. The processing of resulting classes created by XSD will be consistent across the new projects. I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
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...

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.