<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:st1 =
"urn:schemas-microsoft-com:office:smarttags"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2873" name=GENERATOR><!--[if !mso]>
<STYLE>v\:* {
BEHAVIOR: url(#default#VML)
}
o\:* {
BEHAVIOR: url(#default#VML)
}
w\:* {
BEHAVIOR: url(#default#VML)
}
.shape {
BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]--><o:SmartTagType name="PersonName"
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><!--[if !mso]>
<STYLE>st1\:* {
BEHAVIOR: url(#default#ieooui)
}
</STYLE>
<![endif]-->
<STYLE>@font-face {
font-family: Tahoma;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal
}
SPAN.EmailStyle18 {
COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal
}
SPAN.EmailStyle19 {
COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal-reply
}
DIV.Section1 {
page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV dir=ltr align=left><SPAN class=353220504-06062006><FONT face=Arial
color=#0000ff size=2>I had a lot of trouble with this at first. Here's
what I ended up doing:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=353220504-06062006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=353220504-06062006><FONT face=Arial
color=#0000ff size=2>1. In my XSD file, I referred to the workplace
properties file thus:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=353220504-06062006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=353220504-06062006><FONT face=Arial
color=#0000ff
size=2> <xsd:annotation><BR> <xsd:appinfo><BR> <resourcebundle
name="{{runtime.opencms.module.name}}.workplace"/><BR> ...<BR> <BR>(note:
no .properties extension).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=353220504-06062006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=353220504-06062006><FONT face=Arial
color=#0000ff size=2>2. I stored the file workplace.properties in my
module's classpath, at the bottom of the package hierarchy (i.e. in VFS location
/system/modules/com.scintillance.modulename). I ended up creating a copy
too, called workplace_en.properties, just in case the reason OpenCms hadn't been
finding the file was that it was looking only for the locale-specific
version.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=353220504-06062006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=353220504-06062006><FONT face=Arial
color=#0000ff size=2>3. As the instructions say (and as you're doing, it
seems) the workplace.properties entries then become</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=353220504-06062006><FONT size=1><FONT
color=#2a00ff><SPAN
class=353220504-06062006></SPAN></FONT></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=353220504-06062006><FONT size=1><FONT
color=#2a00ff><SPAN class=353220504-06062006><FONT face=Arial color=#0000ff
size=2>fileicon.myResourceType = My resource
type</FONT></SPAN></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=353220504-06062006><FONT face=Arial
color=#0000ff size=2><SPAN class=353220504-06062006>title.newmyResourceType
= New my resource type</SPAN></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=353220504-06062006><FONT face=Arial
color=#0000ff size=2><SPAN
class=353220504-06062006></SPAN></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=353220504-06062006><FONT face=Arial
color=#0000ff size=2><SPAN class=353220504-06062006>Hope this
helps.</SPAN></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=353220504-06062006><FONT face=Arial
color=#0000ff size=2><SPAN
class=353220504-06062006></SPAN></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=353220504-06062006><FONT face=Arial
color=#0000ff size=2><SPAN
class=353220504-06062006>Jon</SPAN></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=353220504-06062006><FONT face=Arial
color=#0000ff size=2><SPAN
class=353220504-06062006></SPAN></FONT> </DIV></SPAN>
<DIV dir=ltr align=left>
<HR tabIndex=-1>
</DIV>
<DIV dir=ltr align=left><FONT face=Tahoma size=2><B>From:</B>
opencms-dev-bounces@opencms.org [mailto:opencms-dev-bounces@opencms.org] <B>On
Behalf Of </B>Chris Tiernan<BR><B>Sent:</B> 05 June 2006 22:12<BR><B>To:</B> The
OpenCms mailing list<BR><B>Subject:</B> RE: [opencms-dev] controlcode & XML
template modules<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Jon
–<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Those resources help a
lot, thanks.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">However, I don’t think
OpenCms is reading my workplace.properties file correctly. Its showing
“???fileicon.topstory???” instead of the value for it when I create a new type
for the magic wand button. Also, my labels in workplace.properties don’t
seem to being read as well. The templates just show’s the coded name instead of
the value of the coded name.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<DIV>
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR tabIndex=-1 align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class=MsoNormal><B><FONT face=Tahoma size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT
face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">
opencms-dev-bounces@opencms.org [mailto:opencms-dev-bounces@opencms.org]
<B><SPAN style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Jonathan
Woods<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Wednesday, May 31,
2006 9:25 PM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B>
'<st1:PersonName w:st="on">The OpenCms mailing
list</st1:PersonName>'<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B>
RE: [opencms-dev] controlcode & XML template
modules</SPAN></FONT><o:p></o:p></P></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">Chris
-</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">There are four things
involved in creating a new Explorer-selectable XML content type: (i) schema
creation, (ii) resource type definition, (iii) explorer linkage, and (iv)
(optional) fancy display config. There's a good FAQ posted by Alexander
Kandzior: <A
href="http://mail.opencms.org/pipermail/opencms-dev/2004q4/013609.html">http://mail.opencms.org/pipermail/opencms-dev/2004q4/013609.html</A> which
deals with (i), (ii) and (iii); and (iv) is covered nicely by <A
href="http://www.opencms-forum.de/viewtopic.php?t=648">http://www.opencms-forum.de/viewtopic.php?t=648</A> (both
pages; start two thirds of the way down the first
page).</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">You'll see
workplace.properties mentioned quite a bit. This is used as a place to
stash things like field labels, field help and so on. It's in Java
property file format and is loaded when it's on the classpath of your
installation. There are multiple workplace.properties files, and when
looking for properties OpenCms hunts through them all until it finds a
match. You should be developing within the context of a module, and so the
best place for your workplace.properties is in the (folder which is equivalent
to the bottom of the) classpath hierearchy. Have a file called
workplace.properties and a copy called workplace.properties_en (and ditto for
any other localisations you're doing).</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">Jon</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR tabIndex=-1 align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class=MsoNormal style="MARGIN-BOTTOM: 12pt"><FONT face=Arial color=blue
size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial"> </SPAN></FONT><B><FONT
face=Tahoma size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT
face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">
opencms-dev-bounces@opencms.org [mailto:opencms-dev-bounces@opencms.org]
<B><SPAN style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Chris
Tiernan<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> 01 June 2006
01:21<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> <st1:PersonName
w:st="on">The OpenCms mailing list</st1:PersonName><BR><B><SPAN
style="FONT-WEIGHT: bold">Subject:</SPAN></B> RE: [opencms-dev] controlcode
& XML template modules</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Gottcha. It seems
that I can’t register or create a new XML content type. I’ve created the
XSD file, my XML content file, and the template, but it seems that it does
not does create the XML content type under the “New > Structured content”
area. How do I ‘register’ that content type with
OpenCms?<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<DIV>
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR tabIndex=-1 align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class=MsoNormal><B><FONT face=Tahoma size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT
face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">
opencms-dev-bounces@opencms.org [mailto:opencms-dev-bounces@opencms.org]
<B><SPAN style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Jonathan
Woods<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Wednesday, May 24,
2006 11:29 AM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B>
'<st1:PersonName w:st="on">The OpenCms mailing
list</st1:PersonName>'<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B>
RE: [opencms-dev] controlcode & XML template
modules</SPAN></FONT><o:p></o:p></P></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">If I understand you
correctly and you're talking about custom XML content types, then yes - OpenCms
should be able to generate document instances automatically, e.g. when clicking
on a direct edit 'new' button or when creating a new resource of the XML content
type. The document instance includes all mandatory elements with empty
contents (I think).</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">Jon</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P>
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR tabIndex=-1 align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class=MsoNormal style="MARGIN-BOTTOM: 12pt"><B><FONT face=Tahoma size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT
face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">
opencms-dev-bounces@opencms.org [mailto:opencms-dev-bounces@opencms.org]
<B><SPAN style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Chris
Tiernan<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> 24 May 2006
18:51<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> <st1:PersonName
w:st="on">opencms-dev@opencms.org</st1:PersonName><BR><B><SPAN
style="FONT-WEIGHT: bold">Subject:</SPAN></B> [opencms-dev] controlcode &
XML template modules</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Does anybody know if the controlcode
for a custom XML template module is supposed to be generated by the OpenCms
system? I have to keep creating a base controlcode XML file for the system
to work, which seems odd. Thanks!<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Best,<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Chris<o:p></o:p></SPAN></FONT></P></DIV></BODY></HTML>