<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[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]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p
{mso-style-priority:99;
margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="NO-BOK" link="#0563C1" vlink="#954F72">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>hi paul,</p>
<p><br>
</p>
<p>do you know content relationships in opencms? </p>
<p><br>
</p>
<p><a href="https://books.google.ch/books?id=Yh-XwPwtbewC&pg=PT106&lpg=PT106&dq=opencms+xsd+relation+invalidate&source=bl&ots=gH_rJDAKDv&sig=0e6_1wywy5EXgjTK6TFi8-LPFok&hl=de&sa=X&ved=0ahUKEwjm_96h5dXQAhWC6xQKHUU3A6IQ6AEIQzAF#v=onepage&q=opencms%20xsd%20relation%20invalidate&f=false" class="OWAAutoLink" id="LPlnk286082" previewremoved="true">https://books.google.ch/books?id=Yh-XwPwtbewC&pg=PT106&lpg=PT106&dq=opencms+xsd+relation+invalidate&source=bl&ots=gH_rJDAKDv&sig=0e6_1wywy5EXgjTK6TFi8-LPFok&hl=de&sa=X&ved=0ahUKEwjm_96h5dXQAhWC6xQKHUU3A6IQ6AEIQzAF#v=onepage&q=opencms%20xsd%20relation%20invalidate&f=false</a><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;"><xsd:element name="Uri" type="OpenCmsVfsFile" /></span><br>
</p>
<p><span><relation element="Uri" type="weak" invalidate="false" /></span><br>
</p>
<p><span><br>
</span></p>
<p><span>should do the trick.</span></p>
<p><br>
</p>
<p><br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> opencms-dev-bounces@opencms.org <opencms-dev-bounces@opencms.org> im Auftrag von Paul-Inge Flakstad <flakstad@npolar.no><br>
<b>Gesendet:</b> Freitag, 2. Dezember 2016 14:44:28<br>
<b>An:</b> The OpenCms mailing list<br>
<b>Betreff:</b> Re: [opencms-dev] Allow links to non-existing resources</font>
<div> </div>
</div>
<div>
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Hi Lorenz,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">This would work great sometimes. But what about elements that should also allow links to regular, existing VFS resources? For those, I'd really like to use OpenCmsVfsFile / OpenCmsVarLink, so that
the VFS browser widget and link checking is enabled. (And by "link checking" I mean when publishing/deleting not when editing.)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Also, there's the issue of links in the text: Can I rely on the editor to not strip away links to internal resources that do not exist?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Anyway, I really appreciate your input! I actually hadn't considered the approach you're suggesting here ;)
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">My idea was to link to e.g. "/en/people/lookup?id=jane.doe" => "lookup" would be a JSP that issues a 301 redirect to "/en/people/jane.doe/". This should work but all existing URIs in OpenCmsVfsFile/OpenCmsVarLink
element fields would have to be changed (I think).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Paul<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:NO-BOK">From:</span></b><span lang="EN-US" style="mso-fareast-language:NO-BOK"> opencms-dev-bounces@opencms.org [mailto:opencms-dev-bounces@opencms.org]
<b>On Behalf Of </b>Lorenz Lammersdorf<br>
<b>Sent:</b> 2. desember 2016 11:02<br>
<b>To:</b> The OpenCms mailing list <opencms-dev@opencms.org><br>
<b>Subject:</b> Re: [opencms-dev] Allow links to non-existing resources<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div id="divtagdefaultwrapper">
<p><span style="font-family:"Calibri",sans-serif;color:black">maybe i've misunderstood your approach, but why do you need links? i'd build a xml scheme linke this:<o:p></o:p></span></p>
<p><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p><span style="font-family:"Calibri",sans-serif;color:black"><xsd:element name="externalResourceLanguage" type="OpenCmsString" /><o:p></o:p></span></p>
<p><span style="font-family:"Calibri",sans-serif;color:black"><xsd:element name="externalResourcePool" type="OpenCmsString" /><o:p></o:p></span></p>
<p><span style="font-family:"Calibri",sans-serif;color:black"><xsd:element name="externalResourceIdentifier" type="OpenCmsString" /><o:p></o:p></span></p>
<p><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p><span style="font-family:"Calibri",sans-serif;color:black"><layout element="externalResourceLanguage" widget="SelectorWidget" configuration="en | klyngon | l33t | whatever" /><o:p></o:p></span></p>
<p><span style="font-family:"Calibri",sans-serif;color:black"><layout element="externalResourcePool" widget="SelectorWidget" configuration="people | dogs | cats | penguins" /><o:p></o:p></span></p>
<p><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p><span style="font-family:"Calibri",sans-serif;color:black">and based on this i'd "manufacture" the link in the template. of course it's a little more work for your editors, but you get rid of the whole dummy folders and files.<o:p></o:p></span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:NO-BOK">
<hr size="2" width="98%" align="center">
</span></div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black;mso-fareast-language:NO-BOK">Von:</span></b><span style="color:black;mso-fareast-language:NO-BOK">
<a href="mailto:opencms-dev-bounces@opencms.org">opencms-dev-bounces@opencms.org</a> <<a href="mailto:opencms-dev-bounces@opencms.org">opencms-dev-bounces@opencms.org</a>> im Auftrag von Paul-Inge Flakstad <<a href="mailto:flakstad@npolar.no">flakstad@npolar.no</a>><br>
<b>Gesendet:</b> Freitag, 2. Dezember 2016 10:40:21<br>
<b>An:</b> The OpenCms mailing list<br>
<b>Betreff:</b> [opencms-dev] Allow links to non-existing resources</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:NO-BOK">
<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:NO-BOK"> <o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Hi all,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Our OpenCms site integrates some externally stored content for example, person details (name, email, phone, etc.). I'll use this example to explain.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Each person page has a unique, human-friendly URI, like "/en/people/jane.doe/".
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Up until now, we've employed one dummy folder + index file in the VFS for every person. These are just empty resources; all the magic happens in the index file's template, which uses the ID found in the URI (e.g. "jane.doe")
to fetch the externally stored content and render the page. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">This approach works great with respect to the internal workings of OpenCms, but it's not very efficient. In an attempt to remedy that, I decided to write a resource initializer for requests to stuff inside the "/en/people/"
folder. It works great. All our person URIs work they are in fact unchanged with only the folder "/en/people/" existing in the VFS.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Finally we can get rid of those unnecessary dummy resources!
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">...there's just this tiiiny little problem...
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Links won't work anymore(!!!). At least not link fields in xmlcontent imagine f.ex. a dedicated field called "Author" or "Contact person".<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Naturally, once all the dummy stuff is gone, adding a link to "/en/people/######" will produce an error. "Invalid reference, the resource can not be found." And it's correct, of course; the ###### resource doesn't exist
in the VFS. I'd still like to save the link, though.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Is there a way to circumvent this problem? Or am I forced to handle the issue another way? (I have good ideas on how to, but they would require modifying all existing links and we have thousands of pages...)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks in advance,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Paul</span><span lang="EN-US" style="font-size:8.0pt;color:#2E74B5;mso-fareast-language:NO-BOK"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:NO-BOK"><br>
<br>
<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;mso-fareast-language:NO-BOK">Lorenz Lammersdorf<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Arial",sans-serif;mso-fareast-language:NO-BOK">Entwickler<br>
+41 58 255 13 06<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:NO-BOK"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Arial",sans-serif;mso-fareast-language:NO-BOK">Aktuell im Blog:
<a href="http://mensch-marke.info/social-media-b2b-gruende/">Social Media im B2B: Eine grosse Chance für Ihr Unternehmen</a>
<br>
<br>
Kernbrand AG<br>
Teufener Strasse 11<br>
9000 St. Gallen<br>
<a href="https://kernbrand.ch">www.kernbrand.ch</a> <br>
<br>
Folgen Sie uns: <a href="http://bit.ly/Kernbrand_Facebook">Facebook</a> | <a href="http://bit.ly/Kernbrand_Pinterest">Pinterest</a> | <a href="http://bit.ly/Kernbrand_LinkedIn1">LinkedIn</a> | <a href="http://bit.ly/Kernbrand_Twitter">Twitter</a> | <a href="http://bit.ly/Kernbrand_Youtube">Youtube</a>
<o:p></o:p></span></p>
</div>
</div>
</div>
<br>
<br>
<br>
<div style="font-size: 13px; font-family: sans-serif;">Lorenz Lammersdorf</div>
<div style="font-size: 11px; font-family: sans-serif;">Entwickler<br>
+41 58 255 13 06</div>
<br>
<div style="font-size: 11px; font-family: sans-serif;">Aktuell im Blog: <a href="http://mensch-marke.info/social-media-b2b-gruende/">
Social Media im B2B: Eine grosse Chance für Ihr Unternehmen</a> <br>
<br>
Kernbrand AG<br>
Teufener Strasse 11<br>
9000 St. Gallen<br>
<a href="https://kernbrand.ch">www.kernbrand.ch</a> <br>
<br>
Folgen Sie uns: <a href="http://bit.ly/Kernbrand_Facebook">Facebook</a> | <a href="http://bit.ly/Kernbrand_Pinterest">Pinterest</a> | <a href="http://bit.ly/Kernbrand_LinkedIn1">LinkedIn</a> | <a href="http://bit.ly/Kernbrand_Twitter">Twitter</a> | <a href="http://bit.ly/Kernbrand_Youtube">Youtube</a>
</div>
</body>
</html>