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

Jason Trump jason.trump at brulant.com
Thu Sep 1 23:30:32 CEST 2005


The name attribute would be 'com.example.site.workplace'.  check out the
JavaDocs for java.util.ResourceBundle to see a description of how named
resource bundles are found in the classpath.

I saw your parse error -- yuck.  Perhaps this is an XML library
compatibility issue?  Are you running JBoss with embedded tomcat?  If
so, what version of tomcat?

> -----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 5:03 PM
> To: The OpenCms mailing list
> Subject: RE: [opencms-dev] xmlcontent - not working - need some
> help/guidance
> 
> Jason,
> 
> Thanks for the input. I do have the
> workspace.properties in a separate module and the
> export points have been set. This is the first time
> that I have seen the "resourcebundle" tag. Does the
> name attribute have to provide an absolute reference
> to the location of workplace.properties?
> 
> The module is called com.example.site. So the
> workplace.properties file is in:
> classes/com/example/site. So would the value be:
> com.example.site? or com.example.site.workplace? or
> com.example.site.workplace.properties?
> 
> Without it, I can still (manually) create the content.
> I will try and add it and see if I can successfully
> create content using the "wand" functionality.
> 
> Thanks,
> 
> Ricky
> 
> 
> --- Jason Trump <jason.trump at brulant.com> wrote:
> 
> > I'm not certain, but I think you might need to
> > specify the location of
> > your workplace.properties file in your
> > specialevent.xsd file.
> >
> > For example, say your workspace.properties file is
> > in package com/foo/.
> > then
> >
> > 	<xsd:annotation>
> > 		<xsd:appinfo>
> > 			<resourcebundle name="com.foo.workplace"/>
> >  			<mappings>
> >  				<mapping element="Title"
> > mapto="property:Title" />
> >  			</mappings>
> >  		</xsd:appinfo>
> >  	</xsd:annotation>
> >
> > And then either copy workplace.properties into the
> > directory
> > opencms.war/WEB-INF/classes/com/foo/ and restart
> > your server, or
> > (probably better but more work) create a module that
> > contains
> > workplace.properties and setup an export point for
> > it (this is how I
> > have done it previously).
> >
> > Good luck
> > jason
> >
> > > -----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 4:31 PM
> > > To: The OpenCms mailing list
> > > Subject: RE: [opencms-dev] xmlcontent - not
> > working - need some
> > > help/guidance
> > >
> > > 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/Specia
> > lE
> > > vent.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
> > > >
> > >
> > >
> > >
> > > _______________________________________________
> > > 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
> >
> 
> 
> 
> _______________________________________________
> 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