cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to edit / validate our .xsd for WebForm???

xexiz
Champ in-the-making
Champ in-the-making
Hello, i'm trying to make a WebForm but I didnt find a validator anywhere and I can't make it work and since I dont know if there is a way to edit our xsd after we created the webform, I am doing it over and over, then add it to a web project then try to "create content" and then there is always an error so I guess my form isnt well formed yet Smiley Sad

The form is to make an xml file with approximately this structure:

– title
– location
_________
|—-title
|—-language='EN'
|—-body
___________
|—-title
|—-language='FR'
|—-body
¯¯¯¯¯¯¯¯¯¯¯
– expiration_date
‍‍‍‍‍‍‍‍‍‍‍‍‍‍

I want to be able to do like the body of the press-release (there is an + button adding another textarea, but well I want this + to add a title, body and language input.)


<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:simpleType name="language">
    <xs:restriction base="xs:normalizedString">
      <xs:enumeration value="French"/>
      <xs:enumeration value="English"/>
    </xs:restriction>
  </xs:simpleType>

  <!– defines the form for creating a press release –>
  <xs:element name="web_page">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="title" type="xs:normalizedString"/>
        <xs:element name="location" type="xs:normalizedString"/>
        <xs:sequence minOccurs="1" maxOccurs="unbounded">
           <xs:element name="title" type="xs:normalizedString"/>
           <xs:element name="language" type="language/> <!– My personal type define on top –>
           <xs:element name="body" type="xs:string"/>
        </xs:sequence>
   <xs:element name="expiration_date" type="xs:date"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
having this error code for now..
org.alfresco.service.cmr.repository.InvalidNodeRefException: Node does not exist: workspace://SpacesStore/acf950ab-aa83-11dc-a736-d7f2cb8da3db

By the way… is there a way to avoid creating over and over the WebForm and adding it to the WebProject, because it will take me a week to made it if there is no other way to refresh a form and make sure the modification are taken in the WebProject..


THANKS!!
10 REPLIES 10

kvc
Champ in-the-making
Champ in-the-making
Everyone:


There are currently two ways to quickly update and test an XSD:

1.  CIFS

     You can mount the Alfresco repository as a shared drive and
     and have direct access to your XSD from Windows Explorer.
     You can open, edit, and save changes directly to your XSD from
     your tool of choice.  For web developers working with schema for
     the first time, a standard site development tools like DreamWeaver
     is also an excellent tool for working with XSDs.

2.  Check-out / check-in  -  OR  - Update

     The XSD in the Data Dictionary is a normal Alfresco-managed asset.
     If you cannot mount a shared drive and work via CIFS, you can do
     a normal check-out to download your XSD to workstation, edit
     locally, and then check-in your changes or use the Update action to
     upload and replace the current XSD with the new version from your
     desktop.

A few considerations:

A.  For XSD editing, we highly recommend using an editor like a
     DreamWeaver.  Although you can use any simple text editors,
     more developer-friendly editors like a DreamWeaver help you when
     writing your XSD in doing things like closing out all your tags, etc.

     I would not recommend using TinyMCE for XSD.  TinyMCE is designed
     to write our formatted hypertext and is intended for business users
     only when authoring certain sections of a web page where in-line
     formatting options are needed.

     TinyMCE is not designed to be an XML or XSD editor.  I would expect
     TinyMCE to add extraneous characters or whitespace that will in all
     cases break your XSD. 

B.  Once you've updated your XSD, you can immediately test out in a
     Web Project that is subscribed to that Web Form.  The XSD is read
     from the Data Dictionary each time you go to the Create/Edit Content
     Wizard. 

     It is often useful to have a test Web Project that just subscribes to
     your new Web Forms until you get in working order.  Then, once you
     save a new XSD via CIFS direct back to the Data Dictionary, you can
     immediately test in a safe, protected environment.

C.  With all this in mind, please note that the Edit Web Form Wizard is
     what you access to do things like (a) change or add output paths
     or (b) add or remove new template associations.  The Edit Web Form
     Wizard is a configuration wizard to set the properties of the Web Form.
     This configuration wizard is not intended for edit.  Edit, as noted above,
     is to be handled just as you would any normal Alfresco asset, as your
     XSDs and templates are just normal editable nodes in the Data
     Dictionary.

I hope that helps. 


Kevin