James,

I'm not sure which XML tools that you are using, but I'll give you my experiences and make a suggestion.

I use Eclipse and for XML and XSD editing I've installed the Eclipse Web Tools Project, which you can find here:

http://www.eclipse.org/webtools/main.php

The XML editor in WTP supports creation and editing of XML files with assist and validation based either on the use of DTD or on the use of XSD files to define the structure of the XML documents.

Here is a quick and incomplete sample of an SCA composite file which I built using the editor:

<?xml version="1.0" encoding="UTF-8"?>
<sca:composite name="NCName"
        targetNamespace="http://tempuri.org";
        xmlns:sca="http://www.osoa.org/xmlns/sca/1.0";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xsi:schemaLocation="http://www.osoa.org/xmlns/sca/1.0
                            ../xsds/sca-core.xsd ">

        <sca:component name="test1">
                <sca:service name="service1">
                </sca:service>
        </sca:component>
</sca:composite>

This had validation and assist working for me.

Note the schemaLocation attribute in the composite element - this points at the xsds for SCA. In my case I had a local copy in my project, hence the "../xsds/..." location value. The XSDs are actually also available online in the place implied by their namespace:

http://www.osoa.org/xmlns/sca/1.0/...

So, I hope that by providing a correct schemaLocation attribute in your composite files you should be able to get the behaviour you're after.

Now, I suppose the next thought is to ensure a valid schemaLocation attribute in our sample files....

xsi:schemaLocation="http://www.osoa.org/xmlns/sca/1.0 http://www.osoa.org/xmlns/sca/1.0/sca-core.xsd";

will do the trick I think.

What do other folks think?


Yours, Mike.


James wrote:
thanks for your reply. i adding information about Eclipse use of DTD. if similar for XSD then that's fine (i'm not an expert on this). see screenshots added to this issue.

At 09:26 AM 6/27/2007, you wrote:

[ https://issues.apache.org/jira/browse/TUSCANY-1389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12508537 ]

Mike Edwards commented on TUSCANY-1389:
---------------------------------------

James,

Does it have to be a DTD - or will an XSD be sufficient to meet your requirements?

I have a particular dislike of DTDs born of having to deal with them in relation to SGML documents "back in the old days".

There are plenty of tools that can work with XSDs and use them for validation.

> published DTD for composite XML Schema needed/useful
> ----------------------------------------------------
>
>                 Key: TUSCANY-1389
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1389
>             Project: Tuscany
>          Issue Type: Improvement
> Components: Java SCA BigBank Sample, Java SCA Core Runtime, Java SCA Samples
>    Affects Versions: Java-SCA-0.90
>         Environment: java
>            Reporter: James Tomkinson
>            Priority: Minor
>
> Samples should supply a DOCTYPE in *.composite xml files, that points to a stored DTD, so that XML editing tools can be used to create/edit/validate XML schema. This will enhance productivity/accuracy.
> Example for Hibernate:
> <!DOCTYPE hibernate-configuration PUBLIC
>               "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
> "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd";>

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to