subscribe
- To unsubscribe, e-mail: user-unsubscr...@spark.apache.org For additional commands, e-mail: user-h...@spark.apache.org
Failed to find Spark examples assembly... error message
I'm running 0.9.0 and attempting to try the example described here: https://spark.incubator.apache.org/docs/0.9.0/streaming-programming-guide.html#a-quick-example ./bin/run-example org.apache.spark.streaming.examples.JavaNetworkWordCount local[2] localhost But get the error: ./bin/run-example: line 47: [: /home/centrifuge/spark-0.9.0-incubating-bin-hadoop1/examples/target/scala-2.10/spark-examples-assembly-0.9.0-incubating.jar: binary operator expected Failed to find Spark examples assembly in /home/centrifuge/spark-0.9.0-incubating-bin-hadoop1/examples/target You need to build Spark with sbt/sbt assembly before running this program I've done the 'sbt/sbt assembly' step. I've tried to debug the shell script but it seems like the first problem is the missing assembly file... Any suggestions? Thanks! __ This email has been scanned by the Boundary Defense for Email Security System. For more information please visit http://www.apptix.com/email-security/antispam-virus __
Re: Failed to find Spark examples assembly... error message
The file examples-assembly is not there. I ran 'sbt/sbt examples assembly' and that didn't change anything. Note that the shell script is complaining about binary operator expected but I'm not positive that's a cause or a result for some other problem. Here's what's in the directory: ls -al examples/target/scala-2.10/ total 199648 drwxrwxr-x 4 centrifuge centrifuge 4096 Feb 9 14:51 . drwxrwxr-x 8 centrifuge centrifuge 4096 Feb 9 14:48 .. drwxrwxr-x 3 centrifuge centrifuge 4096 Feb 9 14:47 cache drwxrwxr-x 3 centrifuge centrifuge 4096 Feb 9 14:50 classes -rw-rw-r-- 1 centrifuge centrifuge 125932602 Feb 9 14:51 spark-examples-assembly-0.9.0-incubating.jar -rw-rw-r-- 1 centrifuge centrifuge 78485738 Feb 2 19:05 spark-examples_2.10-assembly-0.9.0-incubating.jar Thanks again. On Mon Feb 10 12:31:31 2014, Mark Hamstra wrote: Is the assembly jar actually missing, or is the script somehow looking in the wrong place? Check /home/centrifuge/spark-0.9.0-incubating-bin-hadoop1/examples/target/scala-2.10. If the examples-assembly jar is not there, then either `./sbt/sbt assembly` or `./sbt/sbt examples/assembly` should build it. Else you need to be looking for why the script is not coming up with the right path to that file. On Mon, Feb 10, 2014 at 8:49 AM, David Swearingen dswearin...@centrifugesystems.com mailto:dswearin...@centrifugesystems.com wrote: I'm running 0.9.0 and attempting to try the example described here: https://spark.incubator.apache.org/docs/0.9.0/streaming-programming-guide.html#a-quick-example ./bin/run-example org.apache.spark.streaming.examples.JavaNetworkWordCount local[2] localhost But get the error: ./bin/run-example: line 47: [: /home/centrifuge/spark-0.9.0-incubating-bin-hadoop1/examples/target/scala-2.10/spark-examples-assembly-0.9.0-incubating.jar: binary operator expected Failed to find Spark examples assembly in /home/centrifuge/spark-0.9.0-incubating-bin-hadoop1/examples/target You need to build Spark with sbt/sbt assembly before running this program I've done the 'sbt/sbt assembly' step. I've tried to debug the shell script but it seems like the first problem is the missing assembly file... Any suggestions? Thanks! __ This email has been scanned by the Boundary Defense for Email Security System. For more information please visit http://www.apptix.com/email-security/antispam-virus __ __ This email has been scanned by the Boundary Defense for Email Security System. For more information please visit http://www.apptix.com/email-security/antispam-virus __ -- -- Centrifuge Systems Director, Professional Services http://www.centrifugesystems.com 7926 Jones Branch Drive McLean, VA 22102 703-517-6910 (m) __ This email has been scanned by the Boundary Defense for Email Security System. For more information please visit http://www.apptix.com/email-security/antispam-virus __
Re: Newbie - Hive Tutorial question, what format is the sample data file in?
Thanks. Still not clear to me what a time field is as an INT: milleseconds since the epoch? That was my question. Sent from my iPhone On Sep 1, 2012, at 9:37 AM, Edward Capriolo edlinuxg...@gmail.com wrote: I do not think their is a sample file. You can tell the format by create table statement. COMMENT 'This is the staging page view table' ROW FORMAT DELIMITED FIELDS TERMINATED BY '44' LINES TERMINATED BY '12' STORED AS TEXTFILE LOCATION '/user/data/staging/page_view'; http://www.asciitable.com/ 12 is a '\n' and 44 is a ','. Since the format is TEXTFILE integers are serialized into strings. On Sat, Sep 1, 2012 at 7:52 AM, David Swearingen dswearin...@42six.com wrote: I'm going through the tutorial at https://cwiki.apache.org/Hive/tutorial.html . It's not clear to me what the exact format of the log file would be for the sample queries described eg at https://cwiki.apache.org/Hive/tutorial.html#Tutorial-LoadingData I can't find a link to download such a file and while I'd be happy to construct one myself it's not clear to me what a viewTime of type INT would look like exactly. Perhaps the file conforms to standard web server logfile formats however there are I believe a couple of variants on that format. Am I missing something? Thanks.
[MarkLogic Dev General] Is fn:doc-available() high performance, or should we use something else like cts:uri-match()?
We have a system with a million or so records. When attempting to discern if a doc with a given uri is in the system, what's the fastest method? Thanks. ___ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general
Re: [MarkLogic Dev General] General Digest, Vol 93, Issue 3
Thanks very much. I should have said we are on 4.2. I'll assume that Mike's comment that It looks to me like doc-available($uri) is equivalent to xdmp:exists(doc($uri)) now applies to 4.2 also and not just 5.0 unless I hear otherwise...not sure how I would verify that myself. I don't have access to prod so that's why I can't simply test this. Thanks again. David On Thu, Mar 1, 2012 at 4:51 PM, general-requ...@developer.marklogic.comwrote: Send General mailing list submissions to general@developer.marklogic.com To subscribe or unsubscribe via the World Wide Web, visit http://developer.marklogic.com/mailman/listinfo/general or, via email, send a message with subject or body 'help' to general-requ...@developer.marklogic.com You can reach the person managing the list at general-ow...@developer.marklogic.com When replying, please edit your Subject line so it is more specific than Re: Contents of General digest... Today's Topics: 1. Is fn:doc-available() high performance, or should we use something else like cts:uri-match()? (David Swearingen) 2. Re: Is fn:doc-available() high performance, or should we use something else like cts:uri-match()? (Danny Sokolsky) 3. Re: Is fn:doc-available() high performance, or should we use something else like cts:uri-match()? (Michael Blakeley) 4. cts:element-query 3rd parameter? (William Merritt Sawyer) 5. Re: Is fn:doc-available() high performance, or should we use something else like cts:uri-match()? (Danny Sokolsky) 6. Re: element-query 3rd parameter? (Danny Sokolsky) -- Message: 1 Date: Thu, 1 Mar 2012 16:15:20 -0500 From: David Swearingen dswearin...@42six.com Subject: [MarkLogic Dev General] Is fn:doc-available() high performance, or should we use something else like cts:uri-match()? To: general@developer.marklogic.com Message-ID: CAG-P1=RSJ0PCgZq4X2UR8eRTR2CXgW+dYjUYKDY=qe69mgk...@mail.gmail.com Content-Type: text/plain; charset=iso-8859-1 We have a system with a million or so records. When attempting to discern if a doc with a given uri is in the system, what's the fastest method? Thanks. -- next part -- An HTML attachment was scrubbed... URL: http://developer.marklogic.com/pipermail/general/attachments/20120301/4f2ff09a/attachment-0001.html -- Message: 2 Date: Thu, 1 Mar 2012 13:25:25 -0800 From: Danny Sokolsky danny.sokol...@marklogic.com Subject: Re: [MarkLogic Dev General] Is fn:doc-available() high performance, or should we use something else like cts:uri-match()? To: MarkLogic Developer Discussion general@developer.marklogic.com Message-ID: c9924d15b04672479b089f7d55ffc1322261f34...@exchg-be.marklogic.com Content-Type: text/plain; charset=us-ascii xdmp:exists(fn:doc(/my/uri.xml)) will be fast. The uri lexicon functions are also a good choice. -Danny From: general-boun...@developer.marklogic.com [mailto: general-boun...@developer.marklogic.com] On Behalf Of David Swearingen Sent: Thursday, March 01, 2012 1:15 PM To: general@developer.marklogic.com Subject: [MarkLogic Dev General] Is fn:doc-available() high performance, or should we use something else like cts:uri-match()? We have a system with a million or so records. When attempting to discern if a doc with a given uri is in the system, what's the fastest method? Thanks. -- next part -- An HTML attachment was scrubbed... URL: http://developer.marklogic.com/pipermail/general/attachments/20120301/a9cef056/attachment-0001.html -- Message: 3 Date: Thu, 1 Mar 2012 13:30:47 -0800 From: Michael Blakeley m...@blakeley.com Subject: Re: [MarkLogic Dev General] Is fn:doc-available() high performance,or should we use something else like cts:uri-match()? To: MarkLogic Developer Discussion general@developer.marklogic.com Message-ID: 910ca2ea-d1a3-4f2b-8bf5-cd257b4a4...@blakeley.com Content-Type: text/plain; charset=us-ascii It looks to me like doc-available($uri) is equivalent to xdmp:exists(doc($uri)) now. Either expression results in a simple list-cache lookup, with no tree fetches and no reliable difference in elapsed-time. If you use a uri lexicon, probably something like exists(cts:uris($uri, 'limit=1')) will be faster than cts:uri-match($uri). But I think there might be cases where doc-available is cached and the lexicon lookup is not, so the lexicon lookup may not always be faster than doc-available. -- Mike On 1 Mar 2012, at 13:25 , Danny Sokolsky wrote: xdmp:exists(fn:doc(/my/uri.xml)) will be fast. The uri lexicon functions are also a good choice. -Danny From: general-boun...@developer.marklogic.com [mailto: general-boun...@developer.marklogic.com] On Behalf OfDavid Swearingen Sent
[MarkLogic Dev General] Integration tests and how to account for the delays in some document ingestion processes
We are testing some of our document ingestion routines, using JUnit and some other libraries, and we need to understand what the best practice is for dealing with the finite amount of time (often tens of seconds) required to ingest successfully, and thus how to somehow delay our assertions (that ingestion succeeded). Thanks. ___ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general
[MarkLogic Dev General] Does CPF support multiple Conditions?
We have a working pipeline with a condition element and an action element, as would be expected. We now need to in essence add a second condition, where we would need both conditions to be evaluated, and if either returned true, then the same action gets executed. We do NOT wish to change the logic of the first condition (the .xqy file) for reasons I won't get into here. Is there a way to do this? We tried adding a second state-transition element, but that appears not to work, and this was just speculation since we can't find any documentation to support doing this. Thanks, David Swearingen 42Six.com ___ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general
Executing a database call for several different matches
I'm building a little logging system that will create a record in a database anytime one of about 20 different pages on my site is hit. So there are now say 20 different map:matches for these pages. I don't want to insert some kind of database call (ESQL, Action, other) in each map:match pattern since that isn't very elegant nor maintainable. So I need suggestions on good Cocoon patterns or best practices that allow something to happen for a specific set of map:match's. I'm thinking maybe if I slightly modify my existing 20 patterns to always start the same, e.g. in this case with the 'mypages' path: map:match pattern=mypages/somepath/about_this_site.html map:match pattern=mypages/somepath/management.html map:match pattern=mypages/somepath/services.html then I could create an additional new match like this, that every request would go through first: map:match pattern=mypages/**/*.html do the database call map:redirect-to uri=mypages/{1}/{2}.html/ /map:match And then the redirect would send the request on to the next proper match. Will this work? Is this the best way? Thanks, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Cocoon-Users] Executing a database call for several different matches
Thanks Irv. With respect to your first solution, I'm not sure I understand how I can still conduct my logic if the generator spot gets taken by the database call. I need to think about that some more. All my patterns start with a page template in the generator. As for the second solution, it reminds me of one idea I was considering: dropping a special element in my page template like do_database_write/ and when my final style sheet sees this, it calls a Xalan Java extension which is simply raw Java JDBC hit. If anyone thinks that's not a decent approach, please advise. -Original Message- From: Irv Salisbury III [mailto:[EMAIL PROTECTED] Sent: Friday, January 28, 2005 11:15 AM To: users@cocoon.apache.org; [EMAIL PROTECTED] Subject: Re: [Cocoon-Users] Executing a database call for several different matches I don't know as I would do a redirect with all of them. There are a number of different ways I could potentially attack this. First, you could call a common starting internal pipeline: map:match pattern=internal-logging/** database stuff in here /map:match map:match pattern=somepage map:generate src=cocoon:/internal-logging/somepage/ rest of pipeline /map:match I realize this takes up the precious generator spot in your pipeline, but is a possible solution I have used where I want all my pipelines to do something common. You still could use an aggregator if you wanted. Another possibility is to use a transformer or an action and then reuse that in various pipelines. map:match pattern=somepage map:action type=mydatabase map:param name=page value=somepage/ now do rest of pipeline /map:action /map:match map:match pattern=somepage map:generate src=whatever/ map:transform type=mydatabase/ rest of pipeline /map:match They both have pros and cons. With the transformer, you could do special tags that represent what you want logged and then just make sure they are in your XML pipeline going through the system. This is usually have I write something like that. In fact, if you piggybacked it on the SQLTransformer, then the mydatabase transformer could just be an XSL that sets up the SQL calls. Hopefully this helps somewhat. Irv David Swearingen wrote: I'm building a little logging system that will create a record in a database anytime one of about 20 different pages on my site is hit. So there are now say 20 different map:matches for these pages. I don't want to insert some kind of database call (ESQL, Action, other) in each map:match pattern since that isn't very elegant nor maintainable. So I need suggestions on good Cocoon patterns or best practices that allow something to happen for a specific set of map:match's. I'm thinking maybe if I slightly modify my existing 20 patterns to always start the same, e.g. in this case with the 'mypages' path: map:match pattern=mypages/somepath/about_this_site.html map:match pattern=mypages/somepath/management.html map:match pattern=mypages/somepath/services.html then I could create an additional new match like this, that every request would go through first: map:match pattern=mypages/**/*.html do the database call map:redirect-to uri=mypages/{1}/{2}.html/ /map:match And then the redirect would send the request on to the next proper match. Will this work? Is this the best way? Thanks, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Creative Ideas on How to Cache Pipelines Containing Non-Cacheable Generator?
I store all my content for a Cocoon site in xml files. This means I make a lot of use of the DirectoryGenerator. It works great, but I've got now some legacy .pdf files from another project, sometimes hundreds per directory, sometimes on another machine on the local network, and so it takes several seconds to collect the directory contents. I know that DirectoryGenerator doesn't cache, which makes sense for most cases. But what about cases like mine where I know the contents of a directory only change once a day at midnight: I don't need to keep pulling the directory's contents all day long with every page hit to my site. I need caching of some sort. I don't mind if the first visitor to my site each day has to wait 5 seconds for that page. But if I could then capture that created final page and store it for the rest of the day, that would be great. I can envision relatively cumbersome solutions like running command line programs on chron jobs to create the data I really need, which is a subset of files from the directory. But all this seems intuitively unnecessary...Cocoon is such a flexible platform that I just sense there's a simpler Cocoon solution to this. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Link Livesites: Legal Portal on Cocoon 2.1.5.1
Website is www.duinetwork.com, which is a legal portal. It's been on the air for about 5 months. Totally Cocoon-driven, all content resides in xml files. Pretty simple site, but has a portal-like architecture which allows me to re-arrange portions of the page if I care to. I've been happy with Cocoon so far. - David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Processing a particular pipeline before every other pipeline?
I need to run some cookie generation code (ina pipeline) before any of my web pages are processed. That is, I've got several pipelines, but I want this particular pipeline to run before any of the others are executed. Obviously, I don't want to have to modify every existing pipeline, and all subsequent new pipelines. I imagine that this code will be an Action or XSP, but that's really besides the point: this is more of a pipeline question as I see it. (I knew how to do this in Struts, but haven't seen anything like this so far in my first few months of using Cocoon.In web applications I'vewritten thistype of thing is normally needed for authentication -- e.g. make sure every request goes through the authentication servlet before it hits any other servlet...) Does anyone know how to do this?
Cocoon CLI Command Line Interface - Basic Question
I'm trying to get Cocoon CLI to work. I've scoured all the documents on this, but can't figure out how cli knows where to find my sitemap. I have cocoon up and running just fine under Tomcat as a web application. What I need is a very basic command line -- which commands are REQUIRED to simply process a request through the sitemap and output to a file? I'd rather just put all the required parameters on the command line rather than have to build an xconf file. It seems to me that the minimum parameters needed if I DON'T reference an xconf file are: -c contextdir (unless I use default) -d destination Part of my confusion in part stems from the fact that I have my sitemap under my Tomcat folder (c:\jakarta-tomcat-4.1.30) but the docs say to run cocoon.bat residing in my cocoon install directory, c:\cocoon-2.1.4.So, should my 'contextdir' be under the jakarta path or the cocoon path? What is the purpose of the contextdir? That's not explained in the docs. Finally, it's not clear to me what the difference is between -x and -C. The page that ostensibly explains all this is http://cocoon.apache.org/2.1/userdocs/offline/cli.html Thanks, David
Best way to merge two xml files
(Subject line of my post may be misleading.) What I'm trying to do is, when XSL processing of foo.xml is taking place, when a certain element is encountered in foo.xml, I want to insert content from someotherdocument.xml. It appears that the XSLT function document() does this. Is this the best way? [I realize that aggregate sounds like it should do the trick, however, aggregate appears to require a priori knowledge of how many documents to aggregate, that is, when creating the sitemap you have to know in advance that you're going to don aggregations. In my case, however, I don't know how often I'm going to have to merge other xml documents when processing the main document.] Hope that made sense. David
Querying A Repository of XML Files...Or, How To Do Portal Objects
(Sorry for the length of this post, but I think it highlights some classic issues that others may encounter so I thought it was worth being specific.) I'm building a web application -- not unlike a "portal" -- that contains mostly text content in files, and part of it requires me to solve a problem which is requiring me to bend my brain out of the SQL/Servlet paradigm and into the XML world, and I don't know the best approach. I picked Cocoon as my platform in part because of the elegance and simplicity of keeping content in xml files in a directory(s) where I can see them, and so I can have ad hoc document structures without having to be tied down to a RDBMS schema that can never match all the content types I'll be publishing. So I think for simplicity's sake here assume I have a directory with a thousand xml files of textual content, say, news articles. So now I'm running into the problem where I want to have objects on my site home page that are like portal objects/windows: theyeach contain clickable titles of a few pieces of content. Imagine a news portal home page where there's a "Sports News" block that lists the most recent three headlines and their dates; and a "Finance News" block that shows Finance headlines, etc., and maybe sometimes in addition to the headline the first sentence of the story is displayed, i.e. each portal block can have it's own behaviors that are configurable. So each of these objects on the page basically does the same function, but the object's parameters are slightly different based upon what category of news it grabs headlines for, how many headlines the editor or user wants displayed, etc. So any given portal object needs at some point to be able to query my repository for a few titles that meet a few criteria. That's easy in SQL of course -- but how do I do something like that in the XML/Cocoon world? Do I index? Do I scour through once and then cache for a few hours? Do I have a separate procedural/Java process that creates intermediate files that can be more rapidly transformed into headline lists? I can imagine different general approaches, but I don't know how to implement with the Cocoon toolset, and I'm sure I'm not the first person to have this requirement. Thanks, David
Re: Newbie: Searching with html form parameters
Nina: I didn't see a reply to your post. I'm relatively new to Cocoon but can relate to your question and was considering this tonight. Yes, if you're new to this environment it's going to be intimidating to figure this out since yes, it's straightforward to do ith with a relational db and servlet (I've done this). Most of the experts on this board will probably tell you it's easy to do this in Cocoon but of course they know how to do it. What they mean is it can be done with a few lines of code! There's a difference between easy and short. Technically, I believe the answer entails a pipeline that scours the directory for the file names, converting these to XML; next step in the pipeline scours each file and extracts JUST the street element; next step does the searching. That's the highlevel approach. You'll have to spend a couple of hours learning what a pipeline is and matchers. If you have thousands of files then for performance reasons you'd probably want to batch (daily, hourly, whatever depending upon the currency you need) the process of the first two steps above, and put the results into a file that would look like this: mydocs file name=foo1.xml street=elm/ file name=foo2.xml street=maple/ ... /mydocs then you would only have to search this file each time. This is just my thinking, from limited experience, but thought I'd put my two cents in. Like most things in Cocoon, seems there are numerous solutions to each problem. (I would have posted this to get others' feedback but I'm in the midst of moving my list subscription to another email address so it was difficult to do that.) David --- Nina Juliadotter [EMAIL PROTECTED] wrote: Hi everyone, Is there an obvious and reasonable simple way to search a XML repository (= a bunch of XML documents) using POST parameters supplied to by the user? What I have is an HTML form where the user can enter some search criteria and submit this, and get back all xml documents matching this (the documents all conform to a certain XML schema, so the elements in it are known). For example, there is an input type=text name=street where the user can enter the street name, and get back all XML documents that have a street element with the same value as the one supplied by the user. In a normal servlet/jdbc environment (relational database), this is so straight forward, but how would I ideally go about doing this in Cocoon? I've glanced at Xindice and Cocoon's Lucene, but it all seems so complicated that I'm starting to think I'm not looking in the right direction. Has anybody done something similar and can point me in the right direction? Thanks, Nina - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25ยข http://photos.yahoo.com/ph/print_splash - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Best Practices for Debugging XML?
Newbie question: what's the best way to view raw xml when debugging pipelines for web development? I think my question comes down to these two points: 1) Should serializers be switched to type="xml" so that I can see raw xml results in a browser? 2) If so, or, in general, are there some good techniques to allow me to debug without having to change some portion of the sitemap each time, i.e., a way to configure the sitemap so that when I request foo.xml instead of foo.html, I see the raw xml instead? David
RE: (Easy) Passing a Variable From Sitemap to StyleSheet?
I posted earlier this week about needing to pass a variable from the sitemap to a stylesheet, and I understand how to do this, but I'm getting a weird error now. [NOT SURE HOW TO ESCAPE HTML FOR POSTS TO MAILING LIST.] I'm setting the variable in the sitemap as follows: map:match pattern=cinc2/*.html map:generate src=cinc2/template.xml/ map:transform type=cinclude map:parameter name=requestedfile value={1}/ /map:transform ... My file template.xml WORKS when hard-coded (cheating) with a filename, as follows: ... thebody cinclude:include src=cinc2/mybody.xml/ /thebody ... but in reality I need the filename parameterized as follows: ... xsl:param name=requestedfile/ ... thebody cinclude:includexsl:attribute name=srcxsl:value-of select=$requestedfile//xsl:attribute/cinclude:include /thebody ... This throws an error as follows: org.apache.cocoon.ProcessingException: Failed to execute pipeline.: org.xml.sax.SAXException: Missing 'src' attribute on cinclude:include element I can't even get this to work, as a test, where I hard-code the attribute value: thebody cinclude:includexsl:attribute name=srccinc2/mybody.xml/xsl:attribute/cinclude:include /thebody Thanks for any assistance. David --- Philipp Burkert [EMAIL PROTECTED] wrote: Hi, I thought this would be easy...I'm trying to pass a variable defined in the Sitemap, and retrieve it in the Stylesheet. first you have to handle the parameter to the transformer within the sitemap. ---sitemap-- map:match pattern=*/show.html map:generate src=xmldb:xindice-embed:///db/beschlusslage// map:transform type=xslt src=xslt/antrag2html.xslt map:parameter name=oid value={1}/ /map:transform Then you have to - declare the parameter in the xslt - and output it later with the $varname syntax ---xslt-- xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:output method=xml version=1.0 encoding=UTF-8 indent=yes/ xsl:param name=oid/ ... xsl:template match=meta name=antrag xsl:value-of select=$oid/ ... Hope that helps PHILIPP BURKERT [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Tax Center - File online by April 15th http://taxes.yahoo.com/filing.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: resolving param in template
Yeah, it's weird: everyone keeps telling me that's the solution, but the error I get when trying that is this: java.io.FileNotFoundException: C:\jakarta-tomcat-4.1.30\webapps\cocoon\mount\my1\{$requestedfile} (The system cannot find the file specified) So, it's ignoring the $ sign. Could I have my param declaration in the wrong place? It's currently immediately under the xsl:stylesheet and xsl:output statements. Thanks, David --- Steve Schwarz [EMAIL PROTECTED] wrote: David I think you want: ... xsl:param name=requestedfile/ ... thebody cinclude:include src={$requestedfile}/ /thebody ... I highly recommend Michael Kay's XSLT 2nd Edition Hope this helps Steve _ Tax headache? MSN Money provides relief with tax tips, tools, IRS forms and more! http://moneycentral.msn.com/tax/workshop/welcome.asp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Tax Center - File online by April 15th http://taxes.yahoo.com/filing.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: (Easy) Passing a Variable From Sitemap to StyleSheet?
Ok, I see the source of the problem now. I am trying to resolve the value of a variable from within an xml document, not within the stylesheet. I'm using the xml document to collect a bunch of xml documents using cinclude. That's where I need to have the name of a file requested in the uri by the user. So the question becomes how to pass the name of a file to a cinclude:include directive inside an xml document, if that makes sense. I will say that this user group is extremely helpful and courteous, the Cocoon platform is awesome, and I hope to be able to give back when I learn enough to contribute. David --- Jorg Heymans [EMAIL PROTECTED] wrote: in the sitemap you do map:transform blah... map:parameter name=myparam value={1}/ /map:transform then in your stylesheet do xsl:param name=myparam/ David Swearingen wrote: I thought this would be easy...I'm trying to pass a variable defined in the Sitemap, and retrieve it in the Stylesheet. Specifically, I have {1} defined in the sitemap, which is the basename of a file, and I want to refer to this filename in a stylesheet that's called by a transformer. I'm then going to reference this filename in the src attribute of a cinclude:include tag in the stylesheet. Need to know a) how to define it in sitemap and b) how to retrieve it in stylesheet. Thanks, David __ Do you Yahoo!? Yahoo! Tax Center - File online by April 15th http://taxes.yahoo.com/filing.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Tax Center - File online by April 15th http://taxes.yahoo.com/filing.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
(Easy) Passing a Variable From Sitemap to StyleSheet?
I thought this would be easy...I'm trying to pass a variable defined in the Sitemap, and retrieve it in the Stylesheet. Specifically, I have {1} defined in the sitemap, which is the basename of a file, and I want to refer to this filename in a stylesheet that's called by a transformer. I'm then going to reference this filename in the src attribute of a cinclude:include tag in the stylesheet. Need to know a) how to define it in sitemap and b) how to retrieve it in stylesheet. Thanks, David __ Do you Yahoo!? Yahoo! Tax Center - File online by April 15th http://taxes.yahoo.com/filing.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Best Way to Build a Traditional Website Structure Using Coc oon?
Gary: I've not considered CSS for layout since I'm comfortable with tables...but I'm open to hearing if there is a better way to layout header/footer/nav/body in a way that is consistently handled by most browsers. David --- Schultz, Gary - COMM [EMAIL PROTECTED] wrote: Have you considered cascading style sheets (css) for layout instead of tables. I'm using that for my web sites and I think it tends to simplify things. Use Cocoon to build the html element structure and css to layout the web page. This way you do not have to worry about getting the different parts of the page in the correct table layout element. The basic layout of our Commerce Housing website at http://commerce.wi.gov/housing/ is css based. Gary T. Schultz Web Technical Administrator / GIS Coordinator Wisconsin Department of Commerce 6th Floor P.O. Box 7970 Madison, WI 1-608-266-1283 -Original Message- From: David Swearingen [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 5:04 PM To: [EMAIL PROTECTED] Subject: Best Way to Build a Traditional Website Structure Using Cocoon? Newbie question: I am designing a dynamic website and have chosen Cocoon as the architecture. The website will contain a 'classic' structure, with left navigation, masthead, footer, and a body section containing content. The various elements, like the navigation, surrounding the content will rarely change of course. I will define these in XML. So there will be a leftnav.xml, masthead.xml, footer.xml. In a typical website like this the whole thing is in an html table, and the top row of the table contains the masthead, a left cell contains the navigation, the right cell contains the body text, and the bottom row contains the footer. Very straightforward, done all the time. I've built numerous sites like this with Struts and other tools. Now imagine the request comes for a page, like faq.html. I know how to make Cocoon grab faq.xml and run it through a XSL transformer to add the html markup and then serialize it out. Done this already. But for my website I need to generate the entire table context for the page, then insert the masthead html, then there's more html that closes the table cell and opens a new one, generates the left navigation html from leftnav.xml, closes the cell, spits out my content from faq.xml, etc., you get the picture. Ideally I want my page structure html -- the code that defines the overall page table that holds all the elements -- in one file, and the masthead, navigation and footer in their own files, and then of course the content documents are in their respective xml files. This makes for easy site maintenance. So what's the best way to do this in Cocoon? It seems it could be accomplished in numerous ways, but I have a feeling there's a best-practice here. Thanks, David __ Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway http://promotions.yahoo.com/design_giveaway/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Tax Center - File online by April 15th http://taxes.yahoo.com/filing.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: (Easy) Passing a Variable From Sitemap to StyleSheet? - One complication
Indeed I can use the variable in the stylesheet as described below by Philip but I failed to anticipate that I have to use the variable INSIDE of another tag, that is, I have a variable foo that represents a filename and I have to use it as follows: [cinclude:include src=foo.xml] I'm assuming I can't nest a xsl:value-of tag inside of a cinclude:include tag...how would I render this value in this manner? Thanks, David --- Philipp Burkert [EMAIL PROTECTED] wrote: Hi, I thought this would be easy...I'm trying to pass a variable defined in the Sitemap, and retrieve it in the Stylesheet. first you have to handle the parameter to the transformer within the sitemap. ---sitemap-- map:match pattern=*/show.html map:generate src=xmldb:xindice-embed:///db/beschlusslage// map:transform type=xslt src=xslt/antrag2html.xslt map:parameter name=oid value={1}/ /map:transform Then you have to - declare the parameter in the xslt - and output it later with the $varname syntax ---xslt-- xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:output method=xml version=1.0 encoding=UTF-8 indent=yes/ xsl:param name=oid/ ... xsl:template match=meta name=antrag xsl:value-of select=$oid/ ... Hope that helps PHILIPP BURKERT [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Tax Center - File online by April 15th http://taxes.yahoo.com/filing.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cocoon Fails to Run - XML Parser Fix Confusion
I'm having what appears to be a very common problem getting Cocoon to work for the first time (error entails ...Xalan in incremental processing mode...). I was able once to solve this problem before on another box but I've misplaced the webpage that described the fix. I'm told this is a very helpful group so I'm confident someone can help me after I've done ALOT of searching to resolve this. Windows XP Pro j2sdk1.4.2_04 (with JAVA_HOME set properly) Apache 2.0 Apache Tomcat 4.1.3 Cocoon 2.0.4 I've done the Set environment variable CATALINA_OPTS=-Djava.awt.headless=true Apache is up and running, and Tomcat responds fine on 8080. I've seen different advice out there on how to solve the Cocoon problem. The solution I recall working for me a few weeks ago entailed removing some parser files and putting something in the endorsed directory. I can't find that advice page now. I see advice about removing jaxp.jar and other files in tomcat/lib, but this must pertain to another version of Tomcat because I don't have a /lib directory under the install root. Hopefully by now some of you are seeing what the solution for me is, and I greatly appreciate your assistance. David __ Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway http://promotions.yahoo.com/design_giveaway/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]