Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Conditional Levels of a Schema

From: "XML4Pharma" <info@----------.--->
To: "Dieter Menne" <dieter.menne@------------.-->, <xmlschema-dev@--.--->
Date: 4/7/2009 6:37:00 PM
Technically this sounds nice ...

but, if I do understand it well, this means that you have two different 
(versions of the) schemas, with the same namespace, and different (although 
slightly different) content.

This is something, just from a principal point of view, I do not like.
My principle is "new standard (version) => new schema (version) => new 
namespace".
I have seen standards, where each subsequent version used the same 
namespace, though the schemas were different.
I have even seen different standards (root element is different), with 
different schemas, all having the same namespace.

When allowing different schemas (i.e. different rules) having the same 
namespace, you know where you start, but you do not know where you end 
(probably in disaster).
For example, how do you work when you need to write an extension of one 
schema with elements/attributes of the other, when both have the same 
namespace?

In your case, I would definitely opt for writing a schematron (which is a 
good excercise anyway).  ;-)

With best regards,

Jozef

Jozef Aerts
XML4Pharma

============

----- Original Message ----- 
From: "Dieter Menne" <dieter.menne@m...>
To: <xmlschema-dev@w...>
Sent: Tuesday, April 07, 2009 3:41 PM
Subject: RE: Conditional Levels of a Schema


>
> In case someone is going to need it, here is Pete's suggestion:
>
> The Master Schema
>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="0.3"
>   xmlns:hrm="http://www.hrmconsensus.org/layers">
> <xs:element name="xhrm">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="device" type="xs:string"/>
> <xs:element minOccurs="0" maxOccurs="1" name="patient"
>    type="xs:string" hrm:patientInfo="1"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
>
>
> Use xsl to convert it to a another xsd where patient info is required. I
> tried to use result-document with it, but could not get the syntax 
> correct.
>
> <?xml version="1.0"?>
> <xsl:stylesheet version="2.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:hrm="http://www.hrmconsensus.org/layers">
>  <xsl:output method="xml" indent="no"/>
>  <xsl:template match="node()|@*">
>    <xsl:copy>
>      <xsl:apply-templates select="@*"/>
>      <xsl:apply-templates/>
>    </xsl:copy>
>  </xsl:template>
>
>  <xsl:template match="@hrm:patientInfo">
>    <xsl:attribute name="minOccurs">
>      <xsl:value-of select="1"/>
>    </xsl:attribute>
>  </xsl:template>
> </xsl:stylesheet>
>
>
> -- 
> View this message in context: 
> http://www.nabble.com/Conditional-Levels-of-a-Schema-tp22905179p22929208.html
> Sent from the w3.org - xmlschema-dev mailing list archive at Nabble.com.
>
>
> 



From lists@n... Tue Apr 07 14:53:55 2009
Received: from bart.w3.org ([128.30.52.63])
	by frink.w3.org with esmtp (Exim 4.63)
	(enve


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent