[opencms-dev] xmlcontent - not working - need some help/guidance

Ricky Tapper rstapper at yahoo.com
Thu Sep 1 22:31:02 CEST 2005


Sure, here is my schema and the control code from my
content:

Schema:

<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
	
	<xsd:include
schemaLocation="opencms://opencms-xmlcontent.xsd"/>	
	<xsd:element name="SpecialEvents"
type="OpenCmsSpecialEvents"/>
	
	<xsd:complexType name="OpenCmsSpecialEvents">
		<xsd:sequence>
			<xsd:element name="SpecialEvent"
type="OpenCmsSpecialEvent" minOccurs="0"
maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="OpenCmsSpecialEvent">
		<xsd:sequence>
			<xsd:element name="Title" type="OpenCmsString" />
		</xsd:sequence>
		<xsd:attribute name="language" type="OpenCmsLocale"
use="required"/>
	</xsd:complexType>

	<xsd:annotation>
		<xsd:appinfo>
			<mappings>
				<mapping element="Title" mapto="property:Title" />
			</mappings>
		</xsd:appinfo>
	</xsd:annotation>

</xsd:schema>

Control code for the content:

<?xml version="1.0" encoding="UTF-8"?>

<SpecialEvents
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="opencms://sites/default/playground/SpecialEvent.xsd">
  <SpecialEvent language="en">
    <Title><![CDATA[New Title]]></Title>
  </SpecialEvent>
</SpecialEvents>

Regards,

Ricky


--- Jason Trump <jason.trump at brulant.com> wrote:

> Can you send your XSD schema as well?
> 
> > -----Original Message-----
> > From: opencms-dev-bounces at opencms.org
> [mailto:opencms-dev-
> > bounces at opencms.org] On Behalf Of Ricky Tapper
> > Sent: Thursday, September 01, 2005 3:58 PM
> > To: opencms-dev at opencms.org
> > Subject: [opencms-dev] xmlcontent - not working -
> need some
> help/guidance
> > 
> > Hi,
> > 
> > I am trying to get xmlcontent to work. I have read
> > EVERY post I could find on this subject and have
> > performed the steps to create the xsd and the
> > xmlcontent. The issue occurs with either the
> > workplace.properties or the opencms-modules.xml
> files
> > (I believe).
> > 
> > I am using OpenCms 6.0, Jboss 4.x, MySQL 4.x on
> > Windows XP Pro. Everything else appears to be
> working
> > fine. If I can get this piece finished then we can
> > finalize our web-site for QA.
> > 
> > Here is the section of the opencms-modules.xml
> file:
> > 
> > <resourcetypes>
> >      <type
> >
>
class="org.opencms.file.types.CmsResourceTypeXmlContent"
> > name="specialevent" id="5000">
> >           <param
> >
>
name="schema">/sites/default/playground/specialevent.xsd</param>
> >      </type>
> > </resourcetypes>
> > <explorertypes>
> >      <explorertype name="specialevent"
> > key="fileicon.specialevent"
> icon="specialevent.gif"
> > reference="xmlcontent">
> >           <newresource page="structurecontent"
> >
>
uri="newresource_xmlcontent.jsp?newresourcetype=specialevent"
> > order="5050"/>
> >           <accesscontrol>
> >                <accessentry
> > principal="GROUP.Administrators"
> > permissions="+r+v+w+c"/>
> >                <accessentry
> > principal="GROUP.Projectmanagers"
> > permissions="+r+v+w+c"/>
> >                <accessentry
> principal="GROUP.Users"
> > permissions="+r+v+w+c"/>
> >           </accesscontrol>
> >      </explorertype>
> > </explorertypes>
> > 
> > Here is the contents of workplace.properties:
> > 
> > #
> > # Localized Strings and help texts to display on
> the
> > article editor
> > #
> > 
> > fileicon.specialevent = SpecialEvent
> > title.newspecialevent = Create a new special event
> > 
> > label.SpecialEvent.Title = Title
> > label.SpecialEvent.Title.help = The title of the
> > special event.<br>This value will be mapped to the
> > "Title" property of the resource.
> > 
> > 
> > editor.defaults.SpecialEvent.Title  = Enter the
> title
> > of the special event here...
> > 
> > 
> >
>
editor.errormessage.SpecialEvent.mustnotcontainerror=Text
> > in {0} must not contain "error" or "Error".
> >
> editor.warning.SpecialEvent.mustnotcontainwarn=Text
> in
> > {0} must not contain "warn" or "Warn".
> > 
> > After making these changes (and copying the GIF
> icon
> > to the appropriate directory), I restarted the
> server.
> > When I tried to create a new piece of content of
> this
> > specific type, I pressed "finish" and I received
> an
> > error that said it could not find the SpecialEvent
> > resource and it did not create the content.
> > 
> > Can anyone help with this? If more information is
> > needed, then I can provide it. I just don't know
> what
> > else to provide. I have been working on this for a
> > coupe of days now with no success. Please help.
> > 
> > Regards,
> > 
> > Ricky Tapper
> > 
> > 
> > 
> > 
> > 
> > _______________________________________________
> > This mail is send to you from the opencms-dev
> mailing list
> > To change your list options, or to unsubscribe
> from the list, please
> visit
> >
> http://mail.opencms.org/mailman/listinfo/opencms-dev
> 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev
> mailing list
> To change your list options, or to unsubscribe from
> the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
> 




More information about the opencms-dev mailing list