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.

kb-names.xsd:
---------------------------->%--------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
xmlns:sch="http://www.ascc.net/xml/schematron">

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

<xs:element name="person" type="type.person">
<xs:annotation>
<xs:appinfo>
<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
element.
</sch:assert>
</sch:rule>
</sch:pattern>
</xs:appinfo>
</xs:annotation>
</xs:element>
<!-- ... -->
</xs:schema>
---------------------------->%--------------------------

kb.xsd:
---------------------------->%--------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
xmlns:sch="http://www.ascc.net/xml/schematron"
targetNamespace="http://www.kb.se"
xmlns:kb="http://www.kb.se">

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

Thanks,
/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

4
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:...
3
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
0
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"><!--...
1
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...
0
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). ...
11
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...
2
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
0
by: YellowFin Announcements | last post by:
Whitepaper: "Yellowfin Reporting" enables Embedded Business Intelligence -------------------------------------------------------------------------------- Embedded reports are a standard...
1
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...
0
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=()=>{
2
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...
0
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...
2
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...
4
NeoPa
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 :...
1
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...
0
NeoPa
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...
0
isladogs
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...
4
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.