DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41183>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41183





------- Additional Comments From [EMAIL PROTECTED]  2006-12-15 08:33 -------
I introduced LinkTarget.exists() for this purpose, maybe this works:
(I didn't try it yet)

Index:
/Users/nobby/apache/lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/LinkRewritingTransformer.java
===================================================================
---
/Users/nobby/apache/lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/LinkRewritingTransformer.java
(revision 482993)
+++
/Users/nobby/apache/lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/LinkRewritingTransformer.java
(working copy)
@@ -36,6 +36,7 @@
 import org.apache.lenya.ac.Policy;
 import org.apache.lenya.ac.PolicyManager;
 import org.apache.lenya.cms.linking.LinkResolver;
+import org.apache.lenya.cms.linking.LinkTarget;
 import org.apache.lenya.cms.publication.Document;
 import org.apache.lenya.cms.publication.DocumentFactory;
 import org.apache.lenya.cms.publication.DocumentUtil;
@@ -56,7 +57,7 @@
  * <p>
  * This transformer is applied to an XHMTL document. It processes all links
  * following the [EMAIL PROTECTED] LinkResolver} syntax which are denoted by
- * [EMAIL PROTECTED] ResourceType#getLinkAttributeXPaths()}.
+ * [EMAIL PROTECTED] 
org.apache.lenya.cms.publication.ResourceType#getLinkAttributeXPaths()}.
  * </p>
  * <p>
  * These links are resolved using the following rules:
@@ -209,8 +210,9 @@
                         if (linkUriAndQuery.length > 1) {
                             queryString = linkUriAndQuery[1];
                         }
-                        Document targetDocument =
this.linkResolver.resolve(doc, linkUri).getDocument();
-                        if (targetDocument != null) {
+                        LinkTarget target = this.linkResolver.resolve(doc,
linkUri);
+                        if (target.exists()) {
+                            Document targetDocument = target.getDocument();
                             String extension = targetDocument.getExtension();
                             if (extension.length() > 0) {
                                 extension = "." + extension;


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to