> From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]] > > From: Morrison, John [mailto:[EMAIL PROTECTED]] > > > From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]] > > > > From: Morrison, John [mailto:[EMAIL PROTECTED]] > > > > > > > > I'm trying to use the header selector, but I keep > dropping through > > > > to the default (jpeg). Does anybody have a clue what > I'm missing/ > > > > doing wrong? The {1} and {2} files exist I just keep getting a > jpeg > > > > even though I have both the svg plugin and png support! > > > > > > Have your seen your logs? ;) > > > > Me? Logs? Na ;) > > > > > Other thing: are you sure that you have: > > > > > > Accepts=accepts('image/svg-xml') > > > > > > In the HTTP header? > > > > The fact that browsers would tell me that they understand > svg (IE has > > the plugin) is wishful thinking me thinks :( > > ...and syntax of the header is different from what you are trying to > use.
corrected. IE still doesn't add into the header the fact that it understands svg/pdf... :( > > > > I'm (as usual ;) using the head of cvs and the latest beta of TC > 4. > > > > > > > > <map:match pattern="*/*"> > > > > <map:generate src="data/{1}.xml"/> > > > > <map:transform src="charts/{2}.xsl"/> > > > > <map:select type="header"> > > > > > > <map:parameter name="header-name" > > > value="accepts-or-whatever-you-need"/> > > > > Thanks, I took this from somewhere in the cvs tree, I'll find it > > again and fix it. > > That's was Stefano's conceptual paper, should not be taken > literally :) <grin>oops</grin> I just did a grep! > Nobody written AcceptMatcher yet which will know accept > header semantic. I thought I could use... <map:select type="header"> <map:parameter name="header-name" value="accept"/> <map:when test="..."> > > In the mean time... > > > > <log> > > HeaderSelector: Header: 'accept' getHeader='null' values='*/*' > > HeaderSelector: Header: 'accept-language' getHeader='null' > values='en-gb' > > HeaderSelector: Header: 'accept-encoding' getHeader='null' > values='gzip, > > deflate' > > HeaderSelector: Header: 'user-agent' getHeader='null' > values='Mozilla/4.0 > > (compatible; MSIE 6.0; Windows NT 5.0)' > > HeaderSelector: Header: 'host' getHeader='null' > values='localhost:8080' > > HeaderSelector: Header: 'connection' getHeader='null' > values='Keep-Alive' > > HeaderSelector: Header: 'cache-control' getHeader='null' > values='no-cache' > > HeaderSelector: Header: 'cookie' getHeader='null' > > values='ASPSESSIONIDGGGGGGGH=GZSTWTCCDIFRFLWAAIHXISQBPQQQHAQL' > > </log> > > > > all the getHeader requests return null (output from a hack > to enum all > > header names, getHeader value and getHeaders values), which is > worrying > > 'cause elsewhere in the code... > > Hm. Something is broken? What about 2.0.3? Looks that way. Oops, might be my mistake. Spotted a bug in the hack :( I've not got any time to look at this atm. I'll come back to it. It wont do exactly what I want anyway if svg isn't included in the list. Thanks. J. > > <code> > > String value = > ObjectModelHelper.getRequest(objectModel).getHeader(name); > > if (value == null) { > > getLogger().debug("Header '" + name + "' not set -- failing."); > > return false; > > } > > > > return value.equals(expression); > > </code> > > > > Which (I read as) this selector can never work...? > > > > Also, I find it worrying that the 'accept' header's values are "*/*" > when > > I think it should look like: > > > > IE: "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, > > application/vnd.ms-excel, application/msword, > application/vnd.ms-powerpoint, > > */*" > > Mozila: > > > "text/xml,application/xml,application/xhtml+xml,text/html;q=0. > 9,text/pla > in;q > > > =0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css > ,*/*;q=0.1 > " > > Opera: "text/html, image/png, image/jpeg, image/gif, > image/x-xbitmap, > */*" > > > > any ideas? > > > > J. > > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > ======================================================================= Information in this email and any attachments are confidential, and may not be copied or used by anyone other than the addressee, nor disclosed to any third party without our permission. There is no intention to create any legally binding contract or other commitment through the use of this email. Experian Limited (registration number 653331). Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>