472,982 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,982 software developers and data experts.

embedded schematron and chameleon design

I have a modular set of xml schemas that are being <include/>d
into a master schema. The modules have no target namespace,
but `inherit' the namespace of the master schema -- this is
the so called Chameleon design. The master schema in its turn
is <import/>ed into other schemas with different namespaces.

Now, in the modules I'd like to use Schematron rules. Problem
is, these do not seem to inherit the target namespace of the
master schema. The way out is to define the context namespace
in the Schematron rules themselves with for example
<sch:ns uri="http://www.kb.se" prefix="kb"/>.
But, this goes counter against the idea with the Chameleon design.

So my question is, is there a way for the Schematron rules to
inherit the target namespace of the including schema?
(Hope this is clear.)

Below are sample code snippets.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"

<xs:complexType name="type.person" mixed="true">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:group ref="group.personElements"/>

<xs:element name="person" type="type.person">
<sch:pattern name="Test">
<sch:rule context="person">
<sch:assert test="count(persName) &gt; 1">
You can have only one persName element within a person
<!-- ... -->

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"

<xs:include schemaLocation="kb-names.xsd"/>
<xs:include schemaLocation="kb-identifiers.xsd"/>
<!-- ... -->

/Patrik Nyman
Nov 16 '07 #1
0 1595

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

Similar topics

by: Samuel Sagan | last post by:
Hi I'm considering starting a new project at SourceForge, codenamed 'Chameleon++'. The concept is to develop a set of C++ clases and functions that closely mimmick the Python fundamentals:...
by: gabriel | last post by:
Is there such a parser out there? I'm using XMLSPY.. can its native parser handle imbedded Schematron and validate an instace against it? /Gabriel
by: disteve | last post by:
Can Schematron validate that an attribute value is unique within an XML document? If so, what would the assert or report tests be? See below. Ex. <ALLOCATION type="CLASS" name="CLASS A"><!--...
by: shaun roe | last post by:
I want to ensure that a reference from one element to another is valid, e.g <character name="sleepy"> <friends_with name="doc"/> </character> <character name="sneezy"> <friends_with...
by: jean-gert nesselbosch | last post by:
hello everybody, does anybody know where to get an xslt-implementation of ISO-schematron ? I want to make use of the "let"-feature (that is : using variables inside a schematron-schema). ...
by: Mark Yudkin | last post by:
The documentation is unclear (at least to me) on the permissibility of accessing DB2 (8.1.5) concurrently on and from Windows 2000 / XP / 2003, with separate transactions scope, from separate...
by: Tom Gugger | last post by:
AIM EXECUTIVE tgugger@aimexec.com 419-255-1900 We have a client that needs an embedded software engineer. This is
by: YellowFin Announcements | last post by:
Whitepaper: "Yellowfin Reporting" enables Embedded Business Intelligence -------------------------------------------------------------------------------- Embedded reports are a standard...
by: leeanngriego | last post by:
I have a client who has asked me to find him some solid up and coming embedded engineers. 2 to 3 years expereince with Embedded Linux, VxWorks, Nucleus or any other RTOS who has working in L2/L3...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.