Anthony,

I am able to use this schema just fine with eclipse.  At least, I get the
content assistance when I start to type a tag like "<xsp:".  FWIW, I don't
find the content assistance terribly helpful in SunBow at the moment, so I
don't really use it.

XML Spy says your schema doc has an error:  'name="xsp:page" cannot have a
namespace prefix.  Please remove prefix or use ref= instead!'
I don't know if that is why you are having trouble, but I imagine you would
get a result like you are getting if the schema cannot be loaded
successfully by SunBow.

Since I am able to use the schema okay, it may be a difference in what we
have installed:  jdk version, xml parser, sunbow version, eclipse version,
etc.  What exactly is happening when your "content is not recognized"?  Are
you not getting the content assist feature, or is it more than that?

Here's what I am using:
Eclipse 2.1.1
Sunbow 1.0.0
Sun jdk 1.4.2

-Christopher



|---------+------------------------------------>
|         |           anthony_herve            |
|         |           <[EMAIL PROTECTED]|
|         |           eelance.fr>              |
|         |                                    |
|         |           06/16/2004 08:37 AM      |
|         |           Please respond to users  |
|         |                                    |
|---------+------------------------------------>
  
>--------------------------------------------------------------------------------------------------------------|
  |                                                                                    
                          |
  |       To:       [EMAIL PROTECTED]                                                  
                    |
  |       cc:                                                                          
                          |
  |       Subject:  Edit xsp files in Eclipse with sunBow                              
                          |
  
>--------------------------------------------------------------------------------------------------------------|




Hello,

I am trying to edit xsp files in Eclipse using the sunBow plugin.
I have added in Window/Preferences/sunBow/XML Editor, in the
Content-Assistant Schema Associations frame, the xsp file extension. For
this file extension, I have configured an associated schema :
- Namespace-Prefix : xsp
- Schema : /home/ahe/Downloadedprograms/xsp.xsd

Hereafter is the content of this xsd file :

----------
<xsd:schema xmlns:xsd='http://www.w3.org/2001/XMLSchema'
    targetNamespace="http://apache.org/xsp";
    xmlns="http://apache.org/xsp";>


<xsd:element name='xsp:page'>
  <xsd:complexType>
   <xsd:sequence>
    <xsd:element ref='xsp:structure' minOccurs='0' maxOccurs='1'/>
    <xsd:element ref='xsp:logic' minOccurs='0' maxOccurs='1'/>
    <xsd:element ref='xsp:content'/>
   </xsd:sequence>
   <xsd:attribute name='language' type='xsd:string' use='required'/>
   <xsd:attribute name='result-ns' type='xsd:NMTOKEN' use='optional'/>
   <xsd:attribute name='default-space' default='preserve'>
    <xsd:simpleType>
     <xsd:restriction base='xsd:string'>
      <xsd:enumeration value='preserve'/>
      <xsd:enumeration value='strip'/>
     </xsd:restriction>
    </xsd:simpleType>
   </xsd:attribute>
   <xsd:attribute name='indent-result' default='no'>
    <xsd:simpleType>
     <xsd:restriction base='xsd:string'>
      <xsd:enumeration value='yes'/>
      <xsd:enumeration value='no'/>
     </xsd:restriction>
    </xsd:simpleType>
   </xsd:attribute>
   <xsd:attribute name='xmlns:xsp' type='xsd:string'
fixed='http://java.apache.org/cocoon/xsp'/>
   <xsd:attribute name='xml:space' default='preserve'>
    <xsd:simpleType>
     <xsd:restriction base='xsd:string'>
      <xsd:enumeration value='default'/>
      <xsd:enumeration value='preserve'/>
     </xsd:restriction>
    </xsd:simpleType>
   </xsd:attribute>
  </xsd:complexType>
</xsd:element>

<xsd:element name='xsp:structure'>
  <xsd:complexType>
   <xsd:sequence>
    <xsd:element ref='xsp:dtd' minOccurs='0' maxOccurs='1'/>
    <xsd:element ref='xsp:include' minOccurs='0' maxOccurs='unbounded'/>
   </xsd:sequence>
  </xsd:complexType>
</xsd:element>

<xsd:element name='xsp:dtd' type='xsd:string'>
</xsd:element>

<xsd:element name='xsp:include' type='xsd:string'>
</xsd:element>

<xsd:element name='xsp:variable' type='xsd:string'>
</xsd:element>

<xsd:element name='xsp:content'>
  <xsd:complexType mixed='true'>
   <xsd:choice minOccurs='0' maxOccurs='unbounded'>
    <xsd:element ref='xsp:logic'/>
    <xsd:element ref='xsp:element'/>
    <xsd:element ref='xsp:eval'/>
    <xsd:element ref='xsp:pi'/>
    <xsd:element ref='xsp:comment'/>
   </xsd:choice>
  </xsd:complexType>
</xsd:element>

<xsd:element name='xsp:logic'>
  <xsd:complexType mixed='true'>
   <xsd:choice minOccurs='0' maxOccurs='unbounded'>
    <xsd:element ref='xsp:eval'/>
    <xsd:element ref='xsp:content'/>
    <xsd:element ref='xsp:element'/>
    <xsd:element ref='xsp:comment'/>
    <xsd:element ref='xsp:pi'/>
   </xsd:choice>
   <xsd:attribute name='xml:space' default='preserve'>
    <xsd:simpleType>
     <xsd:restriction base='xsd:string'>
      <xsd:enumeration value='default'/>
      <xsd:enumeration value='preserve'/>
     </xsd:restriction>
    </xsd:simpleType>
   </xsd:attribute>
  </xsd:complexType>
</xsd:element>

<xsd:element name='xsp:element'>
  <xsd:complexType mixed='true'>
   <xsd:choice minOccurs='0' maxOccurs='unbounded'>
    <xsd:element ref='xsp:attribute'/>
    <xsd:element ref='xsp:element'/>
    <xsd:element ref='xsp:logic'/>
   </xsd:choice>
   <xsd:attribute name='name' type='xsd:string' use='required'/>
  </xsd:complexType>
</xsd:element>

<xsd:element name='xsp:attribute'>
  <xsd:complexType>
  <xsd:simpleContent>
  <xsd:extension base='xsd:string'>
   <xsd:attribute name='name' type='xsd:string' use='required'/>
   <xsd:attribute name='xml:space' default='preserve'>
    <xsd:simpleType>
     <xsd:restriction base='xsd:string'>
      <xsd:enumeration value='default'/>
      <xsd:enumeration value='preserve'/>
     </xsd:restriction>
    </xsd:simpleType>
   </xsd:attribute>
   </xsd:extension>
   </xsd:simpleContent>
  </xsd:complexType>
</xsd:element>

<xsd:element name='xsp:pi'>
  <xsd:complexType mixed='true'>
   <xsd:sequence>
    <xsd:element ref='xsp:eval'/>
   </xsd:sequence>
  </xsd:complexType>
</xsd:element>

<xsd:element name='xsp:comment'>
  <xsd:complexType mixed='true'>
   <xsd:sequence>
    <xsd:element ref='xsp:eval'/>
   </xsd:sequence>
  </xsd:complexType>
</xsd:element>

<xsd:element name='xsp:eval' type='xsd:string'>
</xsd:element>

</xsd:schema>
----------

I have then restarted Eclipse.
When I open a xsp file, the xsp content is still not "recognized".

Does someone know how to fix this ? Is sunBow relevant for xsp edition ?

Thanks for your help.

Regards.


Anthony Hervé


---------------------------------------------------------------------
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