OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

xliff message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [xliff] matches as a module


Hi All,

I believe that the circular references are legal in XML Schema. To test this I built a small infinite recursion test where you can alternate between namespaces. I also included the "xml" namespace and lang attribute to make sure that can be used from both schemas and namespaces at the same time. You need to properly set up catalogs or have tools that have their own catalogs for this to work well.

I tested validation using xmllint and XML Validator Buddy and both worked and did proper validation in the nested namespaces.

Regards,
Fredrik Estreen

> -----Original Message-----
> From: xliff@lists.oasis-open.org [mailto:xliff@lists.oasis-open.org] On Behalf
> Of Yves Savourel
> Sent: den 7 maj 2012 13:07
> To: 'Rodolfo M. Raya'; xliff@lists.oasis-open.org
> Subject: RE: [xliff] matches as a module
> 
> Good morning Rodolfo,
> 
> > We use "xml:lang" and "xml:space" attributes
> > from the "namespace" schema in <source> and <target>.
> > These two elements  appear inside <match>.
> > We might be able to skip the import in the module
> > but not in the core schema (you commented it out
> > in the core schema too) because <source> and <target>
> > are defined there. I need to check further.
> 
> Correct: I commented out the wrong import. It should definitely be in core
> schema. But it doesn't need to be in matches.xsd (as <source> and <target>
> are not defined there, just referenced).
> 
> And as long as it's not in both it seems to work.
> 
> Cheers,
> -yves
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xliff-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: xliff-help@lists.oasis-open.org
> 

<?xml version="1.0" encoding="utf-8"?>
<circulara xmlns="http://www.example.com/circular-a"; 
		  xmlns:ca="http://www.example.com/circular-a";
		  xmlns:xml="http://www.w3.org/XML/1998/namespace";
		  xml:lang="en-us" foo="hello">
	<cb:circularb xmlns:cb="http://www.example.com/circular-b"; xml:lang="fr-fr" bar="hello">
		<ca:circulara xml:lang="en-us">
			Some text in inner A
		</ca:circulara>
		Some text in outer B
	</cb:circularb>
	Some text in outer A
</circulara>
<?xml version="1.0" encoding="utf-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema";
		  xmlns:xml="http://www.w3.org/XML/1998/namespace";
		  xmlns:ca="http://www.example.com/circular-a";
		  xmlns:cb="http://www.example.com/circular-b";
		  targetNamespace="http://www.example.com/circular-a";
		  elementFormDefault="qualified">
	<import namespace="http://www.w3.org/XML/1998/namespace"; schemaLocation="http://www.w3.org/2001/xml.xsd"/>
	<import namespace="http://www.example.com/circular-b"; schemaLocation="cb.xsd" />
	
	<element name="circulara" type="ca:cat"/>
	
	<complexType name="cat" mixed="true">
		<sequence>
			<element ref="cb:circularb" minOccurs="0"/>
		</sequence>
		<attribute ref="xml:lang" use="required" />
		<attribute name="foo" type="string" use="optional"/>
	</complexType>
</schema>
<?xml version="1.0" encoding="utf-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema";
		  xmlns:xml="http://www.w3.org/XML/1998/namespace";
		  xmlns:ca="http://www.example.com/circular-a";
		  xmlns:cb="http://www.example.com/circular-b";
		  targetNamespace="http://www.example.com/circular-b";
		  elementFormDefault="qualified">
	<import namespace="http://www.w3.org/XML/1998/namespace"; schemaLocation="http://www.w3.org/2001/xml.xsd"/>
	<import namespace="http://www.example.com/circular-a"; schemaLocation="ca.xsd"/>
	
	<element name="circularb" type="cb:cbt"/>
	
	<complexType name="cbt" mixed="true">
		<sequence>
			<element ref="ca:circulara" minOccurs="0"/>
		</sequence>
		<attribute ref="xml:lang" use="required" />
		<attribute name="bar" type="string" use="optional"/>
	</complexType>
	
</schema>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]