473,403 Members | 2,323 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.

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 1615

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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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,...
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
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.