
I'm trying to use Oxygen to edit the set of XML-based config files that come with the Shibboleth package. The package is typically installed on linux, as a plugin into a web server such as apache. The package comes with a set of .xsd files, and an accompanying set of xml catalog files. Here's what a typical supplied catalog file looks like: <?xml version="1.0" encoding="UTF-8"?> <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> <system systemId="urn:oasis:names:tc:SAML:1.0:assertion" uri="/opt/local/shibboleth-sp/share/xml/opensaml/cs-sstc-schema-assertion-1.1.xsd"/> <system systemId="urn:oasis:names:tc:SAML:1.0:protocol" uri="/opt/local/shibboleth-sp/share/xml/opensaml/cs-sstc-schema-protocol-1.1.xsd"/> </catalog> I've tried the following steps: -- downloaded all of the xsd and catalog files to my desktop Mac -- edited the catalog files, changing the file system path in all the uri attributes - launched Oxygen, went to Preferences/XML Catalog, and added the five catalog files that come with the package. - quit Oxygen, re-launched (to have the new Preferences take effect) -- open a Shibboleth xml file, and attempt to validate it I'm presented with an error -- "There is no schema or DTD associated with the document. You can create an association either with the Associate Schema action or from the Options men Preferences/Editor/Default Schema Association." does anyone have a suggestion on a way to get validation to work, using catalog files? Rather than adding everything to the Default Schema Association?

Hello, From the error message reported by Oxygen and from the sample Shibboleth files that I could find there is no xsi:schemaLocation or xsi:noNamespaceSchemaLocation attribute in the XML files. Oxygen does not use XML catalogs at this time for mapping the namespace of an XML document (declared with an xmlns attribute) to the schema that must be used for validation. This is a feature for a future version of Oxygen. I think the easiest solution is the creation of a document type Preferences -> Editor -> Default Schema Association that matches your Shibboleth XML files and specifies the schema that will validate the files. If you want to use an XML catalog for validation you have to add an xsi:schemaLocation attribute to the root element of your XML files, use a URL or a file path as the attribute value, not a URN as in your catalog file ("urn:oasis:names:tc:entity:xmlns:xml:catalog") and set that URL/absolute file path as the systemId attribute value in the catalog file. Note that a relative file path specified in the xsi:schemaLocation attribute first is resolved to an absolute file path relative to the system ID of the XML file and after that the absolute file path is matched with a system entry catalog. Regards, Sorin Steven_Carmody@brown.edu wrote:
I'm trying to use Oxygen to edit the set of XML-based config files that come with the Shibboleth package. The package is typically installed on linux, as a plugin into a web server such as apache. The package comes with a set of .xsd files, and an accompanying set of xml catalog files. Here's what a typical supplied catalog file looks like:
<?xml version="1.0" encoding="UTF-8"?> <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> <system systemId="urn:oasis:names:tc:SAML:1.0:assertion" uri="/opt/local/shibboleth-sp/share/xml/opensaml/cs-sstc-schema-assertion-1.1.xsd"/>
<system systemId="urn:oasis:names:tc:SAML:1.0:protocol" uri="/opt/local/shibboleth-sp/share/xml/opensaml/cs-sstc-schema-protocol-1.1.xsd"/>
</catalog>
I've tried the following steps:
-- downloaded all of the xsd and catalog files to my desktop Mac -- edited the catalog files, changing the file system path in all the uri attributes - launched Oxygen, went to Preferences/XML Catalog, and added the five catalog files that come with the package. - quit Oxygen, re-launched (to have the new Preferences take effect) -- open a Shibboleth xml file, and attempt to validate it
I'm presented with an error -- "There is no schema or DTD associated with the document. You can create an association either with the Associate Schema action or from the Options men Preferences/Editor/Default Schema Association."
does anyone have a suggestion on a way to get validation to work, using catalog files? Rather than adding everything to the Default Schema Association? _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

I am sorry, the document type must be created in Preferences -> Document Type Association. You can find details in the User Manual: http://www.oxygenxml.com/doc/ug-oxygen/preferences-document-type-association... Regards, Sorin Sorin Ristache wrote:
Hello,
I think the easiest solution is the creation of a document type Preferences -> Editor -> Default Schema Association that matches your Shibboleth XML files and specifies the schema that will validate the files.

At 11:20 AM +0200 1/15/09, Sorin Ristache wrote:
Hello,
From the error message reported by Oxygen and from the sample Shibboleth files that I could find there is no xsi:schemaLocation or xsi:noNamespaceSchemaLocation attribute in the XML files. Oxygen does not use XML catalogs at this time for mapping the namespace of an XML document (declared with an xmlns attribute) to the schema that must be used for validation. This is a feature for a future version of Oxygen. I think the easiest solution is the creation of a document type Preferences -> Editor -> Default Schema Association that matches your Shibboleth XML files and specifies the schema that will validate the files.
thanks very much for the information. It turns out that I'm currently using Oxygen 8; in that version it looks like I enter this info via Preferences -> Editor -> Default Schema Association. I added my five catalog.xml files via "Preferences -> Editor -> Default Schema Association". The only difference I could see between sample supplied catalog files in the Oxygen/frameworks directory, and the Shibboleth catalog files was that the catalog file for frameworks/XML included this element: <!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> so I added that to the catalog file for shibboleth/xmltooling. I then tried to validate, and got this error msg: SystemID: /Users/stc/Sites/Projects/Shibboleth/Oxygen-2/Schema/xmltooling/catalog.xml Location: 3:62 Description: s4s-elt-schema-ns: The namespace of element 'catalog' must be from the schema namespace, 'http://www.w3.org/2001/XMLSchema'. SystemID: /Users/stc/Sites/Projects/Shibboleth/Oxygen-2/Schema/xmltooling/catalog.xml Location: 3:62 Description: s4s-elt-invalid: Element 'catalog' is not a valid element in a schema document. SystemID: /Users/stc/Sites/Projects/Shibboleth/Oxygen-2/Schema/xmltooling/catalog.xml Location: 3:62 Description: schema_reference.4: Failed to read schema document 'file:/Users/stc/Sites/Projects/Shibboleth/Oxygen-2/Schema/xmltooling/catalog.xml', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. URL: http://www.w3.org/TR/xmlschema-1/#schema_reference So... things have changed... but I think I'm still in need of some advice... Thanks in advance!

Hello, No, the XML catalog files cannot be added to Preferences -> Editor -> Default Schema Association. Only schema files are added there. The document types were not available in Oxygen 8 so you have to add the XML catalog files in Preferences -> XML -> XML Catalog. You have to add an xsi:schemaLocation attribute to the root element of your Shibboleth XML file, use a URL or a file path as the attribute value, not a URN as in your catalog file ("urn:oasis:names:tc:entity:xmlns:xml:catalog") and set that URL/file path as the systemId attribute value in the catalog file. You can see an example in the files [Oxygen8-install-folder]/samples/jsp/jspsample.jspx and [Oxygen8-install-folder]/frameworks/jsp/xsd/jspcatalog.xml. Regards, Sorin Steven_Carmody@brown.edu wrote:
thanks very much for the information. It turns out that I'm currently using Oxygen 8; in that version it looks like I enter this info via Preferences -> Editor -> Default Schema Association.
I added my five catalog.xml files via "Preferences -> Editor -> Default Schema Association".
The only difference I could see between sample supplied catalog files in the Oxygen/frameworks directory, and the Shibboleth catalog files was that the catalog file for frameworks/XML included this element:
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
so I added that to the catalog file for shibboleth/xmltooling.
I then tried to validate, and got this error msg:
SystemID: /Users/stc/Sites/Projects/Shibboleth/Oxygen-2/Schema/xmltooling/catalog.xml Location: 3:62 Description: s4s-elt-schema-ns: The namespace of element 'catalog' must be from the schema namespace, 'http://www.w3.org/2001/XMLSchema'.
SystemID: /Users/stc/Sites/Projects/Shibboleth/Oxygen-2/Schema/xmltooling/catalog.xml Location: 3:62 Description: s4s-elt-invalid: Element 'catalog' is not a valid element in a schema document.
SystemID: /Users/stc/Sites/Projects/Shibboleth/Oxygen-2/Schema/xmltooling/catalog.xml Location: 3:62 Description: schema_reference.4: Failed to read schema document 'file:/Users/stc/Sites/Projects/Shibboleth/Oxygen-2/Schema/xmltooling/catalog.xml', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. URL: http://www.w3.org/TR/xmlschema-1/#schema_reference
So... things have changed... but I think I'm still in need of some advice...
Thanks in advance!

At 11:40 AM +0200 1/19/09, Sorin Ristache wrote:
Hello,
No, the XML catalog files cannot be added to Preferences -> Editor -> Default Schema Association. Only schema files are added there. The document types were not available in Oxygen 8 so you have to add the XML catalog files in Preferences -> XML -> XML Catalog. You have to add an xsi:schemaLocation attribute to the root element of your Shibboleth XML file, use a URL or a file path as the attribute value, not a URN as in your catalog file ("urn:oasis:names:tc:entity:xmlns:xml:catalog") and set that URL/file path as the systemId attribute value in the catalog file. You can see an example in the files [Oxygen8-install-folder]/samples/jsp/jspsample.jspx and [Oxygen8-install-folder]/frameworks/jsp/xsd/jspcatalog.xml.
I'd like to find a way to use Oxygen with the distributed Shibboleth xml + catalog files (without editing those files). Would this process be easier if I upgraded to Oxygen 10 ?

Yes, as I specified in the first reply the easiest solution is the creation of a document type in Preferences -> Document Type Association. Document types are available starting with version 9.0 so if you upgrade to the current version you can create a document type and set one or more XML catalog files that will be used for the validation and transformation of the XML files of that type. But you do not have to upgrade to version 10 because the Default Schema Association available in versions 8.x allows you to validate the XML files with the schema that you want without adding the xsi:schemaLocation attribute in the XML files. In version 10 you should look at the DocBook 5 predefined document type to see how to create a document type that matches XML documents by namespace URI and specifies an XML catalog for these XML documents. Go to menu Options -> Preferences -> Document Type Association and create a new document type with the New button. Add a matching rule to the Rules table where you specify the namespace URI for Shibboleth XML files. Add the XML catalog file to the Catalogs tab of the dialog. After that the validation of XML documents with that namespace URI will use the specified XML catalog. In version 8 you can also validate the files without editing them and without adding the XML catalog. Go to Options -> Preferences -> Editor -> Default Schema Association and create a new association with your namespace URI (the Namespace column) and the location of the schema (the Schema URI column). Regards, Sorin Steven_Carmody@brown.edu wrote:
I'd like to find a way to use Oxygen with the distributed Shibboleth xml + catalog files (without editing those files).
Would this process be easier if I upgraded to Oxygen 10 ?

At 6:40 PM +0200 1/19/09, Sorin Ristache wrote:
Yes, as I specified in the first reply the easiest solution is the creation of a document type in Preferences -> Document Type Association. Document types are available starting with version 9.0 so if you upgrade to the current version you can create a document type and set one or more XML catalog files that will be used for the validation and transformation of the XML files of that type. But you do not have to upgrade to version 10 because the Default Schema Association available in versions 8.x allows you to validate the XML files with the schema that you want without adding the xsi:schemaLocation attribute in the XML files.
Back to doing this... but still having problems. I'm now using Oxygen 10. I went to Preferences -> Document Type Association, and created six new document types, for the six namesspaces included by this document: <SPConfig xmlns="urn:mace:shibboleth:2.0:native:sp:config" xmlns:conf="urn:mace:shibboleth:2.0:native:sp:config" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" logger="syslog.logger" clockSkew="180"> For each new document type I entered: -- a name -- clicked "New", to create a new rule, set the namespace = [value] (chosen from above), clicked OK to close rule creation -- set schema type to XML Schema -- entered as the Schema URI the full filesystem path to the XSD file containing the schema associated with that name space. Note -- for one of these six document types (corresponding to urn:mace:shibboleth:2.0:native:sp:config ), after I enter the new document type definition, and then EDIT that document type association, the file system path to the XSD file has been moved to "File Name" within the Rule, and has been removed from Schema URI. In the other five document types, the file system path remains in Schema URI. After creating the six new Document Type Associations, I click "Validate Document", and I'm told SystemID: /Users/stc/Sites/Projects/Shibboleth/Oxygen-2/SP/shibboleth2.xml Description: [oXygen] There is no schema or DTD associated with the document. You can create an association either with the Associate Schema action or configuring in the Options the Preferences/Document Type Association list, or by creating a Validation Scenario. What did I do wrong ? Thanks!

I'm dealing with a set of documents in which it is frequently necessary to display sample XML. It is easy enough, of course, to use CDATA sections or to escape open angle brackets to bring the samples in as plain text, but I would like to be able to bring them in as processable XML. What I'd like to do is this: Create an element <sample-xml> and give it a content model of any xml but limit the namespace to "sample" and turn off validation. The markup for a sample would then look like this: <sample-xml id="sample1"> <foo xmlns="sample"> <bar>foobar</bar> </foo> </sample> The sample is then fully processable. I can suppress the xmlns attribute and then do anything I want to format and display the XML. This works fine in text mode, but I have authors who want to work in author mode, and in author mode, none of the markup shows as text. All that shows is the content "foobar". I want the content of <sample-xml> to show up as editable literal markup in author mode. Is there any way to do that? If not now, would you consider it as a feature enhancement for the future? Thanks, Mark --- Mark Baker Analecta Communications Inc. www.analecta.com +1 613 614 5881 * Experience is normative; language is contingent. *

Hello, Do you mean that you added the full path of the XML Schema for validating the documents from "urn:mace:shibboleth:2.0:native:sp:config" in the Schema URI field, close and reopen the dialog for editing the document type association and the path of the XML Schema is moved from Schema URI to File name in the rule from the Rules table? I cannot reproduce that. The value of a field is not moved to other field if you do not move it manually. Please specify the Oxygen build number displayed in the Help -> About dialog, the platform where you run Oxygen and a more detailed list of steps for reproducing the problem: open the Preferences dialog, select Document Type Association, press the New button, etc. You should define only one document type (for the namespace "urn:mace:shibboleth:2.0:native:sp:config" of the document sample that you posted). Regards, Sorin Steven_Carmody@brown.edu wrote:
Note -- for one of these six document types (corresponding to urn:mace:shibboleth:2.0:native:sp:config ), after I enter the new document type definition, and then EDIT that document type association, the file system path to the XSD file has been moved to "File Name" within the Rule, and has been removed from Schema URI. In the other five document types, the file system path remains in Schema URI.
After creating the six new Document Type Associations, I click "Validate Document", and I'm told
SystemID: /Users/stc/Sites/Projects/Shibboleth/Oxygen-2/SP/shibboleth2.xml Description: [oXygen] There is no schema or DTD associated with the document. You can create an association either with the Associate Schema action or configuring in the Options the Preferences/Document Type Association list, or by creating a Validation Scenario.

At 10:16 AM +0200 3/2/09, Sorin Ristache wrote:
Hello,
Do you mean that you added the full path of the XML Schema for validating the documents from "urn:mace:shibboleth:2.0:native:sp:config" in the Schema URI field, close and reopen the dialog for editing the document type association and the path of the XML Schema is moved from Schema URI to File name in the rule from the Rules table?
Yes. I entered six new namespaces; this "quirk" happened with one of the six. It happens repeatedly (I've deleted and re-entered it several times).
I cannot reproduce that. The value of a field is not moved to other field if you do not move it manually. Please specify the Oxygen build number displayed in the Help -> About dialog, the platform where you run Oxygen
intel iMac; OS X 10.5.6, build 2008121713
and a more detailed list of steps for reproducing the problem: open the Preferences dialog, select Document Type Association, press the New button, etc. You should define only one document type (for the namespace "urn:mace:shibboleth:2.0:native:sp:config" of the document sample that you posted).
I just tried using 10.1; that version worked as expected.

I've entered six new document types into "Document Type Association", and I'm getting much further. The file I'm attempting to validate (shibboleth2.xml) contains these three statements: <import namespace="urn:oasis:names:tc:SAML:2.0:assertion" schemaLocation="saml-schema-assertion-2.0.xsd"/> <import namespace="urn:oasis:names:tc:SAML:2.0:protocol" schemaLocation="saml-schema-protocol-2.0.xsd"/> <import namespace="urn:oasis:names:tc:SAML:2.0:metadata" schemaLocation="saml-schema-metadata-2.0.xsd"/> I've entered all three namespace values via "Document Type Association". However, I'm getting errors like this:
SystemID: /Users/stc/Sites/Projects/Shibboleth/Oxygen-2/Schema/shibboleth/shibboleth-2.0-native-sp-config.xsd Engine name: Xerces Severity: warning Description: schema_reference.4: Failed to read schema document 'saml-schema-assertion-2.0.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. Start location: 13:108 URL: http://www.w3.org/TR/xmlschema-1/#schema_reference
for all three schemaLocation values.... Should I enter those values into new, separate "Document Type Association"s, or do something else? Thanks!

Hello, You have to set in the Schema URI field of the document type the location of the XSD file used for validating the file shibboleth2.xml and set in the Schema type field one of the values XML Schema (for validating shibboleth2.xml against an XML Schema) or XML Schema + Schematron (for validating shibboleth2.xml against an XML Schema that includes Schematron rules). The rules created in the Rules table for matching the XML documents with the document type must match the file shibboleth2.xml. This should be enough for validating shibboleth2.xml against the schema specified in the document type. I do not know what you try to do with the three import elements in shibboleth2.xml. Do you want to validate the file shibboleth2.xml against the three schemas (saml-schema-assertion-2.0.xsd, saml-schema-protocol-2.0.xsd, saml-schema-metadata-2.0.xsd)? in Oxygen an XML document is validated only against an XML Schema specified in an xs:schemaLocation attribute or against an XML Schema specified in the document type that matches the XML document. What is shibboleth-2.0-native-sp-config.xsd from the error message? Is that the XML Schema specified in the document type? Is it included or imported from the XML Schema specified in the document type? Regards, Sorin Steven_Carmody@brown.edu wrote:
I've entered six new document types into "Document Type Association", and I'm getting much further.
The file I'm attempting to validate (shibboleth2.xml) contains these three statements:
<import namespace="urn:oasis:names:tc:SAML:2.0:assertion" schemaLocation="saml-schema-assertion-2.0.xsd"/> <import namespace="urn:oasis:names:tc:SAML:2.0:protocol" schemaLocation="saml-schema-protocol-2.0.xsd"/> <import namespace="urn:oasis:names:tc:SAML:2.0:metadata" schemaLocation="saml-schema-metadata-2.0.xsd"/>
I've entered all three namespace values via "Document Type Association". However, I'm getting errors like this:
SystemID: /Users/stc/Sites/Projects/Shibboleth/Oxygen-2/Schema/shibboleth/shibboleth-2.0-native-sp-config.xsd Engine name: Xerces Severity: warning Description: schema_reference.4: Failed to read schema document 'saml-schema-assertion-2.0.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. Start location: 13:108 URL: http://www.w3.org/TR/xmlschema-1/#schema_reference
for all three schemaLocation values....
Should I enter those values into new, separate "Document Type Association"s, or do something else?
Thanks!
participants (3)
-
Mark Baker
-
Sorin Ristache
-
Steven_Carmody@brown.edu