Change flow of sequence of policies using Java Script in apigee? -


If I want to execute the XSL Transform-1 policy, when the URL contains "tennis" keyword, then I How can I do this using the java script policy in apigee?

URL:? Apikey = rgnmd3naaw2qwv79fdtjgz77

Policy: XSL Transform-1

  & lt ;? Xml version = "1.0" encoding = "UTF-8" standalone = "yes"? & Gt; & Lt; XSL async = "false" continuOnError = "false" enabled = "correct" name = "xsltransform-1" & gt; & Lt; DisplayName & gt; XSLTransform-1 & lt; / DisplayName & gt; & Lt; FaultRules / & gt; & Lt; Properties / & gt; & Lt; Source & gt; Feedback & lt; / Source & gt; & Lt; ResourceURL & gt; XSL: // xsltransform -1 & lt; / ResourceURL & gt; & Lt; Ignore ParametersInventedVerify = "True" /> & Lt; OutputVariable & gt; ABC & lt; / OutputVariable & gt; & Lt; / XSL>   

XSL file: xsltransform-1

  & lt ;? XML version = "1.0" encoding = "ISO-8859-1"? & Gt; & Lt ;! - edited by XMLSpy® - & gt; & Lt; Xsl: stylesheet version = "1.0" xmlns: xsl = "http://www.w3.org/1999/XSL/Transform" xmlns: yweather = "http://xml.weather.yahoo.com/ns/ RSS / 1.0 "xmlns: geo =" http://www.w3.org/2003/01/geo/wgs84_pos# "& gt; & Lt; Xsl: template match = "/" & gt; & Lt; Html & gt; & Lt; Body & gt; & Lt; H1 & gt; Player's side & lt; / H1> & Lt; H2 & gt; & Lt; Xsl: Select the value = "root / game / name" /> & Lt; / H2 & gt; & Lt; H3 & gt; Description Details & lt; / H3 & gt; & Lt; Table range = "1" & gt; & Lt; Tr bgcolor = "# 9acd32" & gt; & Lt; Th & gt; Player ID & lt; / Th & gt; & Lt; Th & gt; First name & lt; / Th & gt; & Lt; Th & gt; Last name & lt; / Th & gt; & Lt; Th & gt; Full name & lt; / Th & gt; & Lt; Th & gt; Small name & lt; / Th & gt; & Lt; / TR & gt; & Lt; Xsl: each selection = "root / sports / league / athlete" & gt; & Lt; TR & gt; & Lt; Td> & Lt; Xsl: Select Value = "id" /> & Lt; / Td> & Lt; Td> & Lt; Xsl: Select the value = "first name" /> gt; & Lt; / Td> & Lt; Td> & Lt; Xsl: Select Value = "Last Name" /> & Lt; / Td> & Lt; Td> & Lt; Xsl: Select Value = "Full Name" /> & Lt; / Td> & Lt; Td> & Lt; Xsl: Select the value = "small name" /> & Lt; / Td> & Lt ;! - & lt; Td> & Lt; Xsl: Select the value = "root / sports / league / athlete / id" /> gt; & Lt; / Td> & Lt; Td> & Lt; Xsl: Select the value = "root / sports / league / athlete / first name" /> gt; & Lt; / Td> & Lt; Td> & Lt; Xsl: Select the value = "root / sports / league / athlete / last name" /> & Lt; / Td> & Lt; Td> & Lt; Xsl: Select the value = "root / game / league / athlete / full name" /> & Lt; / Td> & Lt; Td> & Lt; Xsl: Select the value = "root / sports / league / athlete / shortname" /> & Lt; / Td> - & gt; & Lt; / TR & gt; & Lt; / XSL: for-each & gt; & Lt; / Table & gt; & Lt; / Body & gt; & Lt; / Html & gt; & Lt; / XSL: Templates & gt; & Lt; / XSL: stylesheet & gt;    

This can be achieved by the conditional execution of XSLT. You can use the quote to extract a particular value from the request path variable And if the variable's value is 'tennis' then you can execute the XSLT policy.

Is there any special reason that you want to control the flow from javascript?

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -