cancel
Showing results for 
Search instead for 
Did you mean: 

attach file in XSD

princess
Champ in-the-making
Champ in-the-making
I do not understand much English

I want to create schema to be able to raise files.
When creating the content, I want to introduce the route of a local file and to raise the file website.

How can I do it?
8 REPLIES 8

arielb
Champ in-the-making
Champ in-the-making
use xs:anyURI as the type in your schema.  that will present a file picker with an add content link.

princess
Champ in-the-making
Champ in-the-making
i've created this XSD schema but i can't it.

<?xml version="1.0"?>
<xs:schema targetNamespace="http://www.alfresco.org/alfresco" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:alfresco="http://www.alfresco.org/alfresco" elementFormDefault="qualified">
   <xs:element name="prueba">
      <xs:complexType>
         <xs:sequence>
            <xs:element name="uno" type="xs:string"/>
            <xs:element name="dos" type="xs:anyURI"/>
         </xs:sequence>
      </xs:complexType>
   </xs:element>
</xs:schema>

i've created a new context using this schema and XML file make is:

<alfrescoSmiley Tonguerueba>
<alfresco:uno>tit</alfresco:uno>
<alfresco:dos>c:\checkrun.txt</alfresco:dos>
</alfrescoSmiley Tonguerueba>

What can i do?

arielb
Champ in-the-making
Champ in-the-making
what version of the product are you using?  when you fill out that form you should be seeing a file picker component.  are you seeing that?

princess
Champ in-the-making
Champ in-the-making
no, i don't see it.

i'm using WCM 2.0 version

arielb
Champ in-the-making
Champ in-the-making
please install a form for this testcase.  this is my testcase for file picker elements:

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           elementFormDefault="qualified">
  <xs:element name="upload-simple">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="string_with_default" type="xs:normalizedString" default="default value"/>
        <xs:element name="file_from_element" type="xs:anyURI" minOccurs="1" maxOccurs="1"/>
        <xs:element name="file_from_element_with_default" type="xs:anyURI" default="/index.jsp"/>
      </xs:sequence>
      <xs:attribute name="file_from_attribute" type="xs:anyURI" use="required"/>
      <xs:attribute name="file_from_attribute_fixed" type="xs:anyURI" use="required" fixed="/index.jsp"/>
    </xs:complexType>
  </xs:element>
</xs:schema>

princess
Champ in-the-making
Champ in-the-making
Hello,

i've created a form but i don't see a file picker element.

xml file generated is:

<upload-simple file_from_attribute="D:\dibujos\es_bear_cs1.gif" file_from_attribute_fixed="D:\dibujos\es_bear_cs1.gif">
<string_with_default>D:\dibujos\es_bear_cs1.gif</string_with_default>
<file_from_element>D:\dibujos\es_bear_cs1.gif</file_from_element>
<file_from_element_with_default>D:\dibujos\es_bear_cs1.gif</file_from_element_with_default>
</upload-simple>

I am new working with Alfresco and I do not have experience working with content managers.
is necessary to change the configuration of Alfresco?
is necessary some additional file in addition to the XSD?

the control for the fields type dates if it works to me and a calendar unfolds, but for the fields type file (anyURI) it does not do anything, behaves as if outside text

arielb
Champ in-the-making
Champ in-the-making
please confirm that you are on version 2.0 of the product.  you should absolutely be seeing a file picker element for xs:anyURI types.  you can verify your version by looking at the system information screen in the web client.

princess
Champ in-the-making
Champ in-the-making
We are using AlfrescoWCM Preview version.

We are constructing to a manager of contents Web.

we needed to have option WebSite