[oXygen-user] Validate and Validate with …

Sorin Ristache sorin at sync.ro
Mon Oct 10 02:58:01 CDT 2011


Hi Jens,

You are right, the W3C schema should be used. We will update the 
xlink.xsd schema from the XLink framework (the 
[Oxygen-folder]/frameworks/xlink folder) to the latest version from the 
W3C website.


Regards,
Sorin


Jens Østergaard Petersen wrote:
> Hi Sorin,
>
> Thanks a lot for clearing this up for us - it has been bugging us for quite some time.
>
> I wonder if it is correct to use the XLink schema from the Library of Congress (which is ultimately <http://www.loc.gov/standards/mets/xlink.xsd>). Shouldn't <http://www.w3.org/XML/2008/06/xlink.xsd> or <http://www.w3.org/1999/xlink.xsd> be used instead, for such a widely used standard?
>
> There is the problem that what Library of Congress call "simpleLink", W3 call "simpleAttrs". That must be a Library of Congress problem - "simpleLink" comes from <http://www.w3.org/TR/xlink/>.
>
> Best,
>
> Jens
>
> On Oct 7, 2011, at 3:09 PM, Sorin Ristache wrote:
>
>   
>> Hi Jens,
>>
>> The errors are caused by an older version of the xlink.xsd schema which Oxygen loads from [Oxygen-install-folder]/frameworks/xlink and which does not define the xlink:simpleLink group. We will replace it with the latest version of xlink.xsd.
>>
>> When an XML Schema imports the XLink schema Oxygen maps the namespace "http://www.w3.org/1999/xlink" to the local version of xlink.xsd from the [Oxygen-install-folder]/frameworks/xlink folder. The mapping is done by the default XML catalog which is enabled in Preferences -> XML -> XML Catalog. For fixing the error please replace the file [Oxygen-install-folder]/frameworks/xlink/xlink.xsd with the attached file which you can download from:
>>
>> http://www.loc.gov/standards/xlink/xlink.xsd
>>
>>
>> Best regards,
>> Sorin
>>
>>
>> Jens Østergaard Petersen wrote:
>>     
>>> Hi Sorin and Radu,
>>>
>>> Thank you very much for looking into this!
>>>
>>> Cheers,
>>>
>>> Jens
>>>
>>> On Oct 7, 2011, at 2:06 PM, Radu Coravu wrote:
>>>
>>>  
>>>       
>>>> Hi Jens,
>>>>
>>>> I tested and if you validate the XML using the default validation engine (Xerces) the XML is validated.
>>>>
>>>> From what your error message looks like:
>>>>
>>>>    
>>>>         
>>>>> Engine name: Saxon-EE 9.3.0.5
>>>>>      
>>>>>           
>>>> you probably defined a custom validation scenario for your XML file and configured as a validation engine Saxon EE.
>>>>
>>>> When using "Validate with..." action then Xerces is used for validation and this is why validation is successful.
>>>>
>>>> So the question is why Saxon EE reports the XML Schema as invalid.
>>>> The schema "modsCluster.xsd" has a reference to the "xlink.xsd" like:
>>>>
>>>>    
>>>>         
>>>>> <xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="http://www.loc.gov/standards/xlink/xlink.xsd"/>
>>>>>      
>>>>>           
>>>> reference which is correct.
>>>> We'll investigate this and get back with more details.
>>>>
>>>> Regards,
>>>> Radu
>>>>
>>>> Radu Coravu
>>>> <oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger
>>>> http://www.oxygenxml.com
>>>>
>>>>
>>>> On 10/7/2011 2:13 PM, Jens Østergaard Petersen wrote:
>>>>    
>>>>         
>>>>> Hi,
>>>>>
>>>>> I am sure I am just missing something obvious, but here goes!
>>>>>
>>>>> I have a document like
>>>>>
>>>>> <http://kjc-fs2.kjc.uni-heidelberg.de:8600/exist/apps/tamboti/modules/search/source.xql?id=uuid-b0de7aeb-c208-4290-8466-1bb0d9af5172&clean=yes>
>>>>>
>>>>> When I simply "Validate" this, that is click the red checkmark, I get
>>>>>
>>>>> SystemID: http://cluster-schemas.uni-hd.de/modsCluster.xsd
>>>>> Main validation file: /Users/jens/Desktop/Untitled1.xml
>>>>> Schema: http://cluster-schemas.uni-hd.de/modsCluster.xsd
>>>>> Engine name: Saxon-EE 9.3.0.5
>>>>> Severity: fatal
>>>>> Description: The attributeGroup {simpleLink} is referenced, but has not been declared
>>>>> Start location: 1051:0
>>>>>>>>>>
>>>>> The MODS schema in question references the XLink schema which declares the xlink:simpleLink attributeGroup, but the link to the XLink schema is obviously not de-referenced.
>>>>>
>>>>> However, when I choose "Validate with …" by clicking on the arrow to the right of the checkmark and feed the schemaLocation contained in the MODS document (namely,<http://cluster-schemas.uni-hd.de/modsCluster.xsd>), the document validates. In this case then, the XLink schema must be referenced.
>>>>>
>>>>> What explains this difference?
>>>>>
>>>>> When I open the schema at<http://cluster-schemas.uni-hd.de/modsCluster.xsd>, the XLink schema is also not de-referenced.
>>>>>
>>>>> Best,
>>>>>
>>>>> Jens
>>>>>
>>>>> oXygen 13.0 on Max OS X 10.6.8.
>>>>> _______________________________________________
>>>>> oXygen-user mailing list
>>>>> oXygen-user at oxygenxml.com
>>>>> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>>>>>
>>>>>      
>>>>>           
>>>> _______________________________________________
>>>> oXygen-user mailing list
>>>> oXygen-user at oxygenxml.com
>>>> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>>>>    
>>>>         
>>>  
>>>       
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!-- METS XLink Schema, v. 2, Nov. 15, 2004 -->
>> <schema targetNamespace="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink" elementFormDefault="qualified">
>>  <!--  global attributes  --> 
>>  <attribute name="href"  type="anyURI"/>
>>  <attribute name="role" type="string"/>
>>  <attribute name="arcrole" type="string"/>
>>  <attribute name="title" type="string" /> 
>>  <attribute name="show">
>>    <simpleType>
>>      <restriction base="string">
>> 	<enumeration value="new" /> 
>> 	<enumeration value="replace" /> 
>> 	<enumeration value="embed" /> 
>> 	<enumeration value="other" /> 
>> 	<enumeration value="none" /> 
>>      </restriction>
>>    </simpleType>
>>  </attribute>
>>  <attribute name="actuate">
>>    <simpleType>
>>      <restriction base="string">
>> 	<enumeration value="onLoad" /> 
>> 	<enumeration value="onRequest" /> 
>> 	<enumeration value="other" /> 
>> 	<enumeration value="none" /> 
>>      </restriction>
>>    </simpleType>
>>  </attribute>
>>  <attribute name="label" type="string" /> 
>>  <attribute name="from" type="string" /> 
>>  <attribute name="to" type="string" /> 
>>  <attributeGroup name="simpleLink">
>>    <attribute name="type" type="string" fixed="simple" form="qualified" /> 
>>    <attribute ref="xlink:href" use="optional" /> 
>>    <attribute ref="xlink:role" use="optional" /> 
>>    <attribute ref="xlink:arcrole" use="optional" /> 
>>    <attribute ref="xlink:title" use="optional" /> 
>>    <attribute ref="xlink:show" use="optional" /> 
>>    <attribute ref="xlink:actuate" use="optional" /> 
>>  </attributeGroup>
>>  <attributeGroup name="extendedLink">
>>    <attribute name="type" type="string" fixed="extended" form="qualified" /> 
>>    <attribute ref="xlink:role" use="optional" /> 
>>    <attribute ref="xlink:title" use="optional" /> 
>>  </attributeGroup>
>>  <attributeGroup name="locatorLink">
>>    <attribute name="type" type="string" fixed="locator" form="qualified" /> 
>>    <attribute ref="xlink:href" use="required" /> 
>>    <attribute ref="xlink:role" use="optional" /> 
>>    <attribute ref="xlink:title" use="optional" /> 
>>    <attribute ref="xlink:label" use="optional" /> 
>>  </attributeGroup>
>>  <attributeGroup name="arcLink">
>>    <attribute name="type" type="string" fixed="arc" form="qualified" /> 
>>    <attribute ref="xlink:arcrole" use="optional" /> 
>>    <attribute ref="xlink:title" use="optional" /> 
>>    <attribute ref="xlink:show" use="optional" /> 
>>    <attribute ref="xlink:actuate" use="optional" /> 
>>    <attribute ref="xlink:from" use="optional" /> 
>>    <attribute ref="xlink:to" use="optional" /> 
>>  </attributeGroup>
>>  <attributeGroup name="resourceLink">
>>    <attribute name="type" type="string" fixed="resource" form="qualified" /> 
>>    <attribute ref="xlink:role" use="optional" /> 
>>    <attribute ref="xlink:title" use="optional" /> 
>>    <attribute ref="xlink:label" use="optional" /> 
>>  </attributeGroup>
>>  <attributeGroup name="titleLink">
>>    <attribute name="type" type="string" fixed="title" form="qualified" /> 
>>  </attributeGroup>
>>  <attributeGroup name="emptyLink">
>>    <attribute name="type" type="string" fixed="none" form="qualified" /> 
>>  </attributeGroup>
>> </schema>
>>     
>
>   


More information about the oXygen-user mailing list