Guidance with XML and templates
I am currently saving metadata in separate xml files, each of which pertains to a particular image.
(They all resemble the sample XML file above, but with different data, and possibly empty values
in some fields). Currently, no fields are required (but may be in the future).
I am now trying to define a template for the xml files...However, I am a novice with XML and am
having trouble creating a template and its constraints.
I would like the template to:
- Impose an order on the metadata fields, so when I read it in, I can get the appropriate field
at the appropriate time.
- Validate that the type of data entered into those fields are correct.
- If no xml file exists for that image, I will be able to pull in the field names (in order)
into my program, and create a GUI with the field names and no data
- If an xml file does exists for that image, I will be able to pull in the field names (in order)
into my program, and create a GUI with the field names and the data in the xml file
I'm assuming that this template would have to be read in each time a user requests to see the
information associated with an image.
SAMPLE XML FILE
<?xml version="1.0" encoding="UTF-8"?>
<Image>
<metadata>
<Miscellaneous>Here is more Jibberish to fill space</Miscellaneous>
<Photographer>Mayor McCheese</Photographer>
<Date>Sat, Sep 22, 1922</Date>
<Project>44an5</Project>
<Supervisor>Colonel Sanders</Supervisor>
<Location>The Moon</Location>
</metadata>
</Image>/*
I'm assuming the template would take on a form similar to below...
"order" would be the order that they would be placed into the GUI.
"type" would be the type of data allowed in that field (string, int, long, date, etc...)
in this case 'long' is Oracles definition of long and not Javas.
SAMPLE TEMPLATE
<Image>
<metadata>
<Project order=0 type=String></Project>
<Date order=1 type=Date></Date>
<Photographer order=2 type=String></Photographer>
<Supervisor order=3 type=String></Supervisor>
<Miscellaneous order=4 type=Long></Miscellaneous>
<Location order=5 type=String></Location>
</metadata>
</Image>Can anyone guide me in the right direction or offer some hints?
Thanks,
Dustpan
bump?
Similar Messages
-
Working with placeholders and templates in 10gR4
I am new to 10gR4 features. Can someone help me in working with placeholders and templates in 10gR4. Is there a document available on that?
This is what is did. I created a primary page which contains a contribution region for list of articles(dynamic list fragment). Next, I created a secondary page (hcsp file) which is designed to create/update new artcicles. I also added a placeholder before the contribution region for this article by name ArticleDetail.
I was able to add new articles and work with them as usual like in 10gR3.
But when I tried to access the contents of a particular article using wcm_place_holder service I am not able to see any contents.
This is the url for the request
http://hd-pratapm/ucm/idcplg?IdcService=WCM_PLACEHOLDER&siteId=TestSite&dataFileDocName=TESTCONTENTFILE&templateDocName=ArticleDetail
where the TESTCONTENTFILE is the content id of the article data file and ArticleDetail is the name of the placeholder placed above article contribution region.
I tried changing the value of templateDocName to content id of the article (TESTCONTENTFILE) and also tried the content id of eondary page file for article, but the same result. I am not able to see anything on the screen.
Also tried the same with above values with placeholderDefinitionDocName instead of templateDocName parameter but no good.
Anything wrong I am doing here?
Regards,
PratapI tried something different and I am getting the response but the content is not html.
This is what I tried
http://hd-pratapm/ucm/idcplg?IdcService=WCM_PLACEHOLDER&dataFileDocName=TESTARTICLE&templateDocName=TESTARTICLE
and I got the response which is xml data. I think it is the contributed data file for TESTARTICLE.
What we are looking for is the html text for presenting the article directly on external sites. The documentation for WCM_PLACEHOLDER says that it should get html directly. I am not able to get it.
This is the snippet of code of articleDetails.hcsp secondary page
================================================================================================
<!--SS_BEGIN_SNIPPET(fragment1,2)--><!--$ssFragmentInstanceId="fragment1", ssIncludeXml("SS_FRAGMENTS_PLAIN", "fragments/fragment[@id='NavMultiHorizontal']/snippets/snippet[@id='2']/text()")--><!--SS_END_SNIPPET(fragment1,2)-->
</p>
<p> </p>
<p><!--$wcmPlaceholder("QtelArticleDetail")--></p>
<p>
<!--SS_BEGIN_OPENREGIONMARKER(region1)--><!--$SS_REGIONID="region1"--><!--$include ss_open_region_definition --><!--SS_END_OPENREGIONMARKER(region1)-->
<!--SS_BEGIN_ELEMENT(region1_element6)--><!--$ssIncludeXml(SS_DATAFILE,region1_element6 & "/node()")--><!--SS_END_ELEMENT(region1_element6)--> </p>
<p><!--SS_BEGIN_ELEMENT(region1_element2)--><!--$ssIncludeXml(SS_DATAFILE,region1_element2 & "/node()")--><!--SS_END_ELEMENT(region1_element2)--> </p>
<p><!--SS_BEGIN_ELEMENT(region1_element3)--><!--$ssIncludeXml(SS_DATAFILE,region1_element3 & "/node()")--><!--SS_END_ELEMENT(region1_element3)--></p>
<p><!--SS_BEGIN_ELEMENT(region1_element4)--><!--$ssIncludeXml(SS_DATAFILE,region1_element4 & "/node()")--><!--SS_END_ELEMENT(region1_element4)--></p>
<p><!--SS_BEGIN_ELEMENT(region1_element5)--><!--$ssIncludeXml(SS_DATAFILE,region1_element5 & "/node()")--><!--SS_END_ELEMENT(region1_element5)-->
<!--SS_BEGIN_CLOSEREGIONMARKER(region1)--><!--$include ss_close_region_definition --><!--SS_END_CLOSEREGIONMARKER(region1)-->
================================================================================================
Can you please suggest what else needs to be done in order to get html repsonse from WCM_PLACEHOLDER service.
Regards,
Pratap -
PO output with XML and PDF format
Hi All,
I need PO output with XML and PDF format. when I give print it shld go to vendor with xml and pdf format through mail. please kindly guide me on this .
Thanks in advance
JKhi,
try this code to get in pdf form
REPORT zsuresh_test.
Variable declarations
DATA:
w_form_name TYPE tdsfname VALUE 'ZSURESH_TEST',
w_fmodule TYPE rs38l_fnam,
w_cparam TYPE ssfctrlop,
w_outoptions TYPE ssfcompop,
W_bin_filesize TYPE i, " Binary File Size
w_FILE_NAME type string,
w_File_path type string,
w_FULL_PATH type string.
Internal tables declaration
Internal table to hold the OTF data
DATA:
t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
Internal table to hold OTF data recd from the SMARTFORM
t_otf_from_fm TYPE ssfcrescl,
Internal table to hold the data from the FM CONVERT_OTF
T_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
This function module call is used to retrieve the name of the Function
module generated when the SMARTFORM is activated
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = w_form_name
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = w_fmodule
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Calling the SMARTFORM using the function module retrieved above
GET_OTF parameter in the CONTROL_PARAMETERS is set to get the OTF
format of the output
w_cparam-no_dialog = 'X'.
w_cparam-preview = space. " Suppressing the dialog box
" for print preview
w_cparam-getotf = 'X'.
Printer name to be used is provided in the export parameter
OUTPUT_OPTIONS
w_outoptions-tddest = 'LP01'.
CALL FUNCTION w_fmodule
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = w_cparam
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = w_outoptions
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
job_output_info = t_otf_from_fm
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
t_otf[] = t_otf_from_fm-otfdata[].
Function Module CONVERT_OTF is used to convert the OTF format to PDF
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
PDF_DELETE_OTFTAB = ' '
IMPORTING
BIN_FILESIZE = W_bin_filesize
BIN_FILE =
TABLES
otf = T_OTF
lines = T_pdf_tab
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
To display File SAVE dialog window
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
WINDOW_TITLE =
DEFAULT_EXTENSION =
DEFAULT_FILE_NAME =
FILE_FILTER =
INITIAL_DIRECTORY =
WITH_ENCODING =
PROMPT_ON_OVERWRITE = 'X'
CHANGING
filename = w_FILE_NAME
path = w_FILE_PATH
fullpath = w_FULL_PATH
USER_ACTION =
FILE_ENCODING =
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
others = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Use the FM GUI_DOWNLOAD to download the generated PDF file onto the
presentation server
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = W_bin_filesize
filename = w_FULL_PATH
FILETYPE = 'BIN'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
IMPORTING
FILELENGTH =
tables
data_tab = T_pdf_tab
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
reward points if useful,
siri -
Hi,
How are all of you. Well I am new to Flex. But I have started
building simple applications. One of the top most problem I am
facing is working with XML and Button. Can you please assist me in
this. I am explaining my problem:
I have an external XML file like this:
<Menu>
<button>
<idnt>0</idnt>
<label>General Health</label>
<text>General Health pages is currently under
construction</text>
</button>
<button>
<idnt>1</idnt>
<label>Mental Health</label>
<text>Mental Health pages is currently under
construction</text>
</button>
</Menu>
Now I want to generate Buttons Dynamically from this XML. And
the second thing which is the most problematic is that how I code
it so that when I press the Button labled "General Health", it will
show the same text as in the XML tag coresponding to tag
"<label>General Health</label>" ?
I badly need this. I am realy confused on this. Kindly help
me.
Regards
..::DeXLet's assume that variable "node" contains one element of the
XML. For example,
<button>
<idnt>0</idnt>
<label>General Health</label>
<text>General Health pages is currently under
construction</text>
</button>
such that node.label would be "General Health", node.idnt
would be 0, etc.
You can build a Button like this:
var b:Button = new Button();
b.label = node.label;
b.data = node; // more on this later
b.width = 60;
b.height = 26;
addChild(b); // critical - adds the button to the display
list so you can see it
b.addEventHandler( MouseEvent.CLICK, handleClick );
You must set the button's width and height unless the button
will be in a container that will size its own children (like Tile).
Every Flex component has a data property. You can set it to
whatever you like. For your needs it makes sense to set each
Button's data property to the node it relates to.
Now suppose that code above is in a function, createButton:
private function createButton( node:XML ) : void {
// code from above
Here's how to make all the buttons where "menu" is a variable
that contains your XML:
for(var k:int=0; k < menu.button; k++) { // menu.button is
an XMLList
createButton( menu.button[k] );
Now to handle the event:
private function handleEvent( event:MouseEvent ) : void
var b:Button = event.currentTarget as Button;
trace( b.data.text);
When a button is picked, the description element will print
in the debug console. Replace the trace with whatever code you
need. -
"Error while using XML iview" with XML iview template
Our portal platform: HP-UX, WAS 6.40 JAVA, EP 6.0 SP14
We created an XML iview using XML iview template and configured the XML source URL with RSS feeder addresses such as"https://forums.sdn.sap.com/rss/rssmessages.jsp?forumID=41". And then select RSS to XHTMLB as the XML transformation format and save. When I try to preview the iview, I always got error "Error while using XML iview, please contact your system administrator". Here is the log and among which I found an error "java.net.UnknownHostException: news.163.com". Does this indicate that the Portal server is not able to interpret the address of the URL host?
#1.5#000F20196FBC0063000000080000623300043FCBAE39EA79#1196043941051#com.sap.portal.httpConnectivity.transformationService#sap.com/irj#com.sap.portal.httpConnectivity.transformationService.transformerservice#Administrator#1176##bfepdev_EPD_5623650#Administrator#7a7283a09bc511dca79a000f20196fbc#SAPEngine_Application_Thread[impl:3]_19##0#0#Error##Plain###Error during transformation using pipe: transformer-com.sap.portal.transformationservice-RSS_TO_XHTMLB-1.0;transformer-com.sap.portal.transformationservice-XHTMLBSAXHandler-1.0#
#1.5#000F20196FBC00630000000A0000623300043FCBAE39EDB0#1196043941051#com.sap.portal.httpConnectivity.xmlIViewsRuntime#sap.com/irj#com.sap.portal.httpConnectivity.xmlIViewsRuntime#Administrator#1176##bfepdev_EPD_5623650#Administrator#7a7283a09bc511dca79a000f20196fbc#SAPEngine_Application_Thread[impl:3]_19##0#0#Error#1#/System/Server#Plain###transform - exception raised during transformation. Make sure that the input source is valid and that all used transformers exists.#
#1.5#000F20196FBC005B0000001E0000623300043FCBCC12043B#1196044441749#com.sap.portal.httpConnectivity.transformationService#sap.com/irj#com.sap.portal.httpConnectivity.transformationService.java.lang.Class#Administrator#1176##bfepdev_EPD_5623650#Administrator#7a7283a09bc511dca79a000f20196fbc#SAPEngine_Application_Thread[impl:3]_37##0#0#Error##Java###Error openning connection when getting input stream for URL:http://news.163.com/special/00011K6L/rss_newstop.xml
[EXCEPTION]
#1#java.net.UnknownHostException: news.163.com
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
at java.net.Socket.connect(Socket.java:474)
at java.net.Socket.connect(Socket.java:424)
at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
at sun.net.www.http.HttpClient.New(HttpClient.java:339)
at sun.net.www.http.HttpClient.New(HttpClient.java:320)
at sun.net.www.http.HttpClient.New(HttpClient.java:315)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:522)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:499)
at com.sapportals.portal.ivs.http.HttpClient.connect(HttpClient.java:378)
at com.sapportals.portal.ivs.http.HttpClient.send(HttpClient.java:391)
at com.sapportals.portal.pb.contentservice.fetcher.DataFetcher.OpenConnection(DataFetcher.java:117)
at com.sap.portal.httpconnectivity.transformationservice.xmlsource.HTTPStreamSource.getInputStream(HTTPStreamSource.java:295)
at com.sap.portal.httpconnectivity.transformationservice.PipeTransformer.transform(PipeTransformer.java:131)
at com.sap.portal.httpconnectivity.transformationservice.EPBaseTransformer.transform(EPBaseTransformer.java:257)
at com.sap.portal.httpconnectivity.transformationservice.TransformerService.transform(TransformerService.java:284)
at com.sap.portal.httpconnectivity.xmltransformationiview.runtime.XMLTransformationIView.transform(XMLTransformationIView.java:222)
at com.sap.portal.httpconnectivity.xmltransformationiview.runtime.XMLTransformationIView.doContent(XMLTransformationIView.java:87)
at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:646)
at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
at java.security.AccessController.doPrivileged(Native Method)
at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:160)
And then I tried to upload an XML file on the portal server through KM and created another XML iview. I got the same error message "Error while using XML iview....". But I found that the log contained different message:
#1.5#000F20196FBC0059000000090000623300043FCC25CCAC4B#1196045947167#com.sap.portal.httpConnectivity.transformationService#sap.com/irj#com.sap.portal.httpConnectivity.transformationService.transformerservice#Administrator#1176##bfepdev_EPD_5623650#Administrator#7a7283a09bc511dca79a000f20196fbc#SAPEngine_Application_Thread[impl:3]_34##0#0#Error##Plain###Error during transformation using pipe: transformer-com.sap.portal.transformationservice-RSS_TO_XHTMLB-1.0;transformer-com.sap.portal.transformationservice-XHTMLBSAXHandler-1.0#
#1.5#000F20196FBC00590000000B0000623300043FCC25CCAEDC#1196045947168#com.sap.portal.httpConnectivity.xmlIViewsRuntime#sap.com/irj#com.sap.portal.httpConnectivity.xmlIViewsRuntime#Administrator#1176##bfepdev_EPD_5623650#Administrator#7a7283a09bc511dca79a000f20196fbc#SAPEngine_Application_Thread[impl:3]_34##0#0#Error#1#/System/Server#Plain###transform - exception raised during transformation. Make sure that the input source is valid and that all used transformers exists.#
#1.5#000F20196FBC005C000000180000623300043FCC5EB48FCF#1196046901893#com.sap.portal.httpConnectivity.xmlIViewsRuntime#sap.com/irj#com.sap.portal.httpConnectivity.xmlIViewsRuntime#Administrator#1176##bfepdev_EPD_5623650#Administrator#7a7283a09bc511dca79a000f20196fbc#SAPEngine_Application_Thread[impl:3]_33##0#0#Error#1#/System/Server#Plain###transform - exception raised during transformation. Make sure that the input source is valid and that all used transformers exists.#
#1.5#000F20196FBC0066000000020000623300043FCC61683438#1196046947221#com.sap.portal.httpConnectivity.xmlIViewsRuntime#sap.com/irj#com.sap.portal.httpConnectivity.xmlIViewsRuntime#Administrator#1176##bfepdev_EPD_5623650#Administrator#7a7283a09bc511dca79a000f20196fbc#SAPEngine_Application_Thread[impl:3]_7##0#0#Error#1#/System/Server#Plain###transform - exception raised during transformation. Make sure that the input source is valid and that all used transformers exists.#
#1.5#000F20196FBC00570000000D0000623300043FCC7B6DCFB3#1196047383789#com.sap.portal.httpConnectivity.transformationService#sap.com/irj#com.sap.portal.httpConnectivity.transformationService.java.lang.Class#Administrator#1176##bfepdev_EPD_5623650#Administrator#7a7283a09bc511dca79a000f20196fbc#SAPEngine_Application_Thread[impl:3]_30##0#0#Error##Java###Error openning connection when getting input stream for URL:http://bfepdev.bf.ctc.com:50000/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/Links/rss.xml
[EXCEPTION]
#1#java.io.IOException: Server returned HTTP response code: 401 for URL: http://bfepdev.bf.ctc.com:50000/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/Links/rss.xml
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at sun.net.www.protocol.http.HttpURLConnection$3.run(HttpURLConnection.java:840)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:834)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:601)
at com.sapportals.portal.ivs.http.HttpClient.getResponseInputStream(HttpClient.java:615)
at com.sapportals.portal.pb.contentservice.fetcher.DataFetcher.getInputStreamResponse(DataFetcher.java:182)
at com.sap.portal.httpconnectivity.transformationservice.xmlsource.HTTPStreamSource.getInputStream(HTTPStreamSource.java:296)
at com.sap.portal.httpconnectivity.transformationservice.PipeTransformer.transform(PipeTransformer.java:131)
at com.sap.portal.httpconnectivity.transformationservice.EPBaseTransformer.transform(EPBaseTransformer.java:257)
at com.sap.portal.httpconnectivity.transformationservice.TransformerService.transform(TransformerService.java:284)
at com.sap.portal.httpconnectivity.xmltransformationiview.runtime.XMLTransformationIView.transform(XMLTransformationIView.java:222)
at com.sap.portal.httpconnectivity.xmltransformationiview.runtime.XMLTransformationIView.doContent(XMLTransformationIView.java:87)
at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:646)
at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
at java.security.AccessController.doPrivileged(Native Method)
at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:160)
Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: http://bfepdev.bf.ctc.com:50000/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/Links/rss.xml
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:794)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:272)
at com.sapportals.portal.ivs.http.HttpClient.send(HttpClient.java:395)
at com.sapportals.portal.pb.contentservice.fetcher.DataFetcher.OpenConnection(DataFetcher.java:117)
at com.sap.portal.httpconnectivity.transformationservice.xmlsource.HTTPStreamSource.getInputStream(HTTPStreamSource.java:295)
... 37 more
#1.5#000F20196FBC00570000000E0000623300043FCC7B6DD77E#1196047383800#com.sap.portal.httpConnectivity.transformationService#sap.com/irj#com.sap.portal.httpConnectivity.transformationService.transformerservice#Administrator#1176##bfepdev_EPD_5623650#Administrator#7a7283a09bc511dca79a000f20196fbc#SAPEngine_Application_Thread[impl:3]_30##0#0#Error##Plain###Error during transformation using pipe: transformer-com.sap.portal.transformationservice-RSS_TO_XHTMLB-1.0;transformer-com.sap.portal.transformationservice-XHTMLBSAXHandler-1.0#
#1.5#000F20196FBC0057000000100000623300043FCC7B6DD9C8#1196047383801#com.sap.portal.httpConnectivity.xmlIViewsRuntime#sap.com/irj#com.sap.portal.httpConnectivity.xmlIViewsRuntime#Administrator#1176##bfepdev_EPD_5623650#Administrator#7a7283a09bc511dca79a000f20196fbc#SAPEngine_Application_Thread[impl:3]_30##0#0#Error#1#/System/Server#Plain###transform - exception raised during transformation. Make sure that the input source is valid and that all used transformers exists.#
Anyone has any idea on this? thanks.Hi Yepin Jin,
I am facing the same issue did you solved it?
Regards,
Orlando Covault -
Specifying image frame location with XML and Indesign
I'm using CS4 to lay out a collection of documents of different lengths. The text comes from a database with XML tags attached, and is loaded into an Indesign template. I want to position image frames in the document automatically so they are next to their related text. Is it possible to insert some reference in the XML file which will tell the relevant image frame in the template to move next to its related text?
bump?
-
Problems with XML and Datagrid!
Hi!
Trying to follow a similar idea to the app shown on the flex
homepage - i have the following code:
[code]
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
creationComplete="srv.send()">
<mx:HTTPService id="srv"
url="lab-cs3.cs.st-andrews.ac.uk/~aa322/mytube.xml"/>
<mx:DataGrid
dataProvider="{srv.lastResult.videos.video}"/>
</mx:Application>
[/code]
However, when I run the application - it gives the following
error:
[RPC Fault faultString="Error #2148: SWF file
file:///C:/Documents and Settings/Andy/My Documents/Flex Builder
3/HelloWorld/bin-debug/HelloWorld.swf cannot access local resource
lab-cs3.cs.st-andrews.ac.uk/~aa322/mytube.xml. Only
local-with-filesystem and trusted local SWF files may access local
resources." faultCode="InvokeFailed" faultDetail="null"]
at mx.rpc::AbstractInvoker/
http://www.adobe.com/2006/flex/mx/internal::invoke()[E:\dev\3.0.x\frameworks\projects\rpc\ src\mx\rpc\AbstractInvoker.as:263
at mx.rpc.http.mxml::HTTPService/
http://www.adobe.com/2006/flex/mx/internal::invoke()[E:\dev\3.0.x\frameworks\projects\rpc\ src\mx\rpc\http\mxml\HTTPService.as:234
at
mx.rpc.http::HTTPService/send()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\http\HTTP Service.as:758]
at
mx.rpc.http.mxml::HTTPService/send()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\http \mxml\HTTPService.as:217]
at
HelloWorld/___HelloWorld_Application1_creationComplete()[C:\Documents
and Settings\Andy\My Documents\Flex Builder
3\HelloWorld\src\HelloWorld.mxml:2]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.core::UIComponent/dispatchEvent()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\co re\UIComponent.as:9051]
at mx.core::UIComponent/set
initialized()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:1167]
at
mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x\frameworks\projects\frame work\src\mx\managers\LayoutManager.as:698]
at Function/
http://adobe.com/AS3/2006/builtin::apply()
at
mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.0.x\frameworks\projects\framework\sr c\mx\core\UIComponent.as:8460]
at
mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.0.x\frameworks\projects\framework\src \mx\core\UIComponent.as:8403]
and fails to connect to the xml i think.
Any ideas on what I am doing wrong?!
Thanks
AndyYou need to specify the full URL. I would also suggest using
a result handler to assign the xml to your DataGrid dataProvider.
Below is a sample. I set the resultFormat to e4x, which is XML.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute" creationComplete="srv.send()">
<mx:HTTPService id="srv"
url="
http://lab-cs3.cs.st-andrews.ac.uk/~aa322/mytube.xml"
result="videoListLoaded(event)"
resultFormat="e4x"/>
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
[Bindable] private var videoList:XML;
private function videoListLoaded(evt:ResultEvent):void {
videoList = evt.result as XML;
]]>
</mx:Script>
<mx:DataGrid x="10" y="10" id="videos_dg"
dataProvider="{videoList.video}">
<mx:columns>
<mx:DataGridColumn width="200" headerText="label"
dataField="label"/>
<mx:DataGridColumn width="300" headerText="URL"
dataField="url"/>
<mx:DataGridColumn width="50" headerText="views"
dataField="views"/>
<mx:DataGridColumn width="150" headerText="Category"
dataField="category"/>
</mx:columns>
</mx:DataGrid>
</mx:Application>
Vygo -
SWF with xml and css to flv format..need help
I have slideshow that is your typical stand alone .swf with accompanying .xml and .css configuration files along with a folder for the images. I don't have the .fla
I need to flatten this or merge it all together to create an flv. Is this possible and if so how do I do this?
Because this is a client I can't just re-create another slide show..it needs to be exactly the same. For me to redo it entirely in fla would be so very time consuming as the slides have 2-3 different effects each and to get the timing exactly right would be near impossible.
I hope someone has a magical solution for me.Actually Rob, right after posting I came across a post mentioning screen
recorders and tried 5 of them. However, I am either not using the right
settings or the progs I tried weren't good enough cause all of them have
some freeze and jump during recording and the vids don't come out smooth. I
think this may be because although they allow you to set frames per seconds
for recording, they all vary that setting during the actual recording. I can
see the frames per second going from 18 to 12. I am not really experienced
in video.
Here's the list of those I tried: CamStudio, Free screen recorder, BB
Flashback2 express, BSR screen recorder 4 and ZealSoft.
If you happen to know of a really good one or what the right settings might
be I'd be glad to hear it.
By the way, so far, you seem to be the only one who got my question
right..all other replies I got from varying forums tell me to google swf
converters.
Thanks bud.
Griffin -
Help with xml and getNextHighestDepth
I have a thumbnail gallery that is called in with xml- On
stage is a movieClip that covers the entire thumbnail area with the
alpha set to 0. what I'm trying to do is onRelease- have that mc
brought to the front and it's alpha state tween to 100- i've not
much experience using 'getNextHighestDepth' so I'm assuming
something is wrong here... if anyone can help I'd really appreciate
it!
Thanks!i think you want something along the lines of :
stageFade_mc.swapDepths(theMovieOnTopAtTheMoment);
Note that only dynamically created movies have depths. So if
either of the movieclips in question are just sitting in your
timeline you cant swap their depths.
In that case you either need to duplicateMovieClip() or just
set things _visible property where apropriate.
good luck
jon -
Creating PDF with XML and APEX_UTIL.DOWNLOAD_PRINT_DOCUMENT
I am trying to generate a PDF report with an existing BLOB stored in a table being applied to a report template. Here is my procedure.
declare
doc blob;
begin
select img into doc from table where id = :P1_SEL_ID;
APEX_UTIL.DOWNLOAD_PRINT_DOCUMENT (
p_file_name => 'Document',
p_content_disposition => 'attachment',
p_report_data => doc,
p_report_layout => 'TEMPLATE1',
p_report_layout_type => 'rtf',
p_document_format => 'pdf'
end;
When I run the procedure adobe acrobat opens but gives me an error message saying "The file cannot be opened because it has no pages".
I am storing the blob through APEX_UTIL.GET_PRINT_DOCUMENT and a report query with the document format 'XML' here.
declare
idoc blob;
begin
doc := APEX_UTIL.GET_PRINT_DOCUMENT (
p_application_id => 103,
p_report_query_name => 'SAVE_XML',
p_document_format => 'xml');
update table set
img = doc
where id = :P1_SEL_ID;
end;
I am pretty sure that the stored files have data in them as I tried downloading and opening them after stored. Any ideas as to why this is? Is it the way I am storing/calling the blob file?
Edited by: BLum on Feb 1, 2010 4:13 PMNope sorry. I have no idea really of what could be the problem. I cannot even find a valid example of how to use that process in that way. I posted here as a last resort. As sort of a patch I just read the xml file and inserted the data into a temp table then called a report query on the temp table.
-
Problem with XML and XSLT, help...
Okay, I have this XML doc (called stocks.xml):
<?xml:stylesheet type="text/xsl" href="stocks.xsl" version="1.0" encoding="UTF-8"?>
<portfolio>
<stock>
<symbol> SUNW </symbol>
<name> Sun Microsystem </name>
<price> 12.95 </price>
</stock>
<stock>
<symbol> HPW </symbol>
<name> Hewlet Packard </name>
<price> 53.50 </price>
</portfolio>
And I have this XSLT doc (called stocks.xls):
?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xls="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>
<head>
<title> Stocks </title>
<body bgcolor="#ffffcc">
<xsl:apply-template />
</body>
</head>
</html>
</xsl template>
<xsl:template match="portfolio">
<table border="2">
<tr>
<th> Stock Symbol </th><th> Company Name </th><th> Price </th>
</tr>
<xsl:for-each select="stock">
<tr>
<td>
<i><xsl:value-of select="symbol" /></i>
</td>
<td>
<xsl:value-of select="price" />
</td>
</tr>
</xsl:for-each>
</table>
</xsl template>
</stylesheet>
When I try to retrieve the stocks.xml document with
IE, the browser said, there is an error on line 2, can not
recognize xsl:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
Reference to undeclared namespace prefix: 'xsl'. Error processing resource 'http://localhost:8080/examples/jsp/stocks/stocks.xsl'. Line 2, Position 71
<xsl:stylesheet version="1.0" xmlns:xls="http://www.w3.org/TR/WD-xsl">
I just follow this from an example of XML tutorial.
Please help, what is it that I miss? Seems everything
I have is okay....??
Thanks,
Ted.Thanks you all!
You have spotted that mistyped.
However, turns out Internet Browser that I have does not permit the use of XSL. After I fixed the file, I got this
message:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
Keyword xsl:apply-template may not be used here.
Oh well...
Anybody knows, if IE can or can not be used to view the
XML that reference XSL??
Thanks,
Ted. -
A few questions with XML and Flash
Hi there.
I am currently trying to create a 3d carousel using AS2 and XML. I've made a lot of progress, but there ar e few things I am still struggling with and was hopoing that someone here could please steer me in the right direction.
Here is a URL where the Carousel can be found:
http://iongeo.com/ru_innovation_test_dev/carousel_test.html
Here are a few of the things I am wondering:
1. I would like to be ablle to add a back button movide clip, similar to how the tooltip movie clip is presented now; this movie clip would be able to allow users to go back home to the caousel. I can't seem to get it to load correctly however, I would imagine that it would be set up similarly to how the tooltip icon is set up now, but to be able to have an alpha of 100 when the text is loaded in.
2. I was also wondering how I mihgt be able to add links to my .xml document to be able to call in URLs on the web. I've tried several things using the CDATA approach, but can't seem to get it to work.
I would greatly appreciate any assistance privded and am very greatful for any consideration thac ould be provided. Please let me know if there is anything htat I should clarify on.
Below is my code for AS2 and XML so that you might see how things are currently working.
import mx.utils.Delegate;
import mx.transitions.Tween;
import mx.transitions.easing.*;
var numOfItems:Number;
var radiusX:Number = 200;
var radiusY:Number = 75;
var centerX:Number = 300;
var centerY:Number = 150;
var speed:Number = 0.00;
var perspective:Number = 20;
var home:MovieClip = this;
theText._alpha = 0;
theHeader._alpha = 0;
var tooltip:MovieClip = this.attachMovie("tooltip","tooltip",8000);
tooltip._alpha = 0;
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function()
var nodes = this.firstChild.childNodes;
numOfItems = nodes.length;
for(var i=0;i<numOfItems;i++)
var t = home.attachMovie("item","item"+i,i+1);
t.angle = i * ((Math.PI*2)/numOfItems);
t.onEnterFrame = mover;
t.toolText = nodes[i].attributes.tooltip;
t.content = nodes[i].attributes.content;
t.header = nodes[i].attributes.header;
t.icon.inner.loadMovie(nodes[i].attributes.image);
t.r.inner.loadMovie(nodes[i].attributes.image);
t.icon.onRollOver = over;
t.icon.onRollOut = out;
t.icon.onRelease = released;
function over()
//BONUS Section
home.tooltip.tipText.text = this._parent.toolText;
home.tooltip._x = this._parent._x;
home.tooltip._y = this._parent._y - this._parent._height/2;
home.tooltip.onEnterFrame = Delegate.create(this,moveTip);
home.tooltip._alpha = 100;
function out()
delete home.tooltip.onEnterFrame;
home.tooltip._alpha = 0;
function released()
//BONUS Section
home.tooltip._alpha = 100;
for(var i=0;i<numOfItems;i++)
var t:MovieClip = home["item"+i];
t.xPos = t._x;
t.yPos = t._y;
t.theScale = t._xscale;
delete t.icon.onRollOver;
delete t.icon.onRollOut;
delete t.icon.onRelease;
delete t.onEnterFrame;
if(t != this._parent)
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,0,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,0,1,true);
var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,100,0,1,true);
else
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,100,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,100,1,true);
var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,100,1,true);
var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,200,1,true);
var tw5:Tween = new Tween(theText,"_alpha",Strong.easeOut,0,100,1,true);
theText.text = t.content;
var s:Object = this;
tw.onMotionStopped = function()
s.onRelease = unReleased;
function unReleased()
var sou:Sound = new Sound();
sou.attachSound("sdown");
sou.start();
delete this.onRelease;
var tw:Tween = new Tween(theText,"_alpha",Strong.easeOut,100,0,0.5,true);
for(var i=0;i<numOfItems;i++)
var t:MovieClip = home["item"+i];
if(t != this._parent)
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,0,t.theScale,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,0,t.theScale,1,true);
var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,0,100,1,true);
else
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,100,t.theScale,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,100,t.theScale,1,true);
var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,t.xPos,1,true);
var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,t.yPos,1,true);
tw.onMotionStopped = function()
for(var i=0;i<numOfItems;i++)
var t:MovieClip = home["item"+i];
t.icon.onRollOver = Delegate.create(t.icon,over);
t.icon.onRollOut = Delegate.create(t.icon,out);
t.icon.onRelease = Delegate.create(t.icon,released);
t.onEnterFrame = mover;
function moveTip()
home.tooltip._x = this._parent._x;
home.tooltip._y = this._parent._y - this._parent._height/2;
xml.load("icons.xml");
function mover()
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s = (this._y - perspective) /(centerY+radiusY-perspective);
this._xscale = this._yscale = s*100;
this.angle += this._parent.speed;
this.swapDepths(Math.round(this._xscale) + 100);
this.onMouseMove = function()
speed = (this._xmouse-centerX)/8000;
// inactive mouse time (in seconds) to start slowing the carousel
var inactiveMouseTime:Number =1;
// rate of slowing carousel;
var speedDamp:Number = .4;
var speedI:Number;
var startSlowTO:Number;
this.onMouseMove = function(){
clearInterval(speedI);
clearTimeout(startSlowTO);
startSlowTO = setTimeout(startSlowF,inactiveMouseTime);
speed = (this._xmouse-centerX)/8000;
function startSlowF(){
clearInterval(speedI);
speedI=setInterval(speedF,2000);
function speedF(){
speed = speedDamp*speed;
if(speed<.1){
clearInterval(speedI);
speed=0;
Here is an example of how things are loaded from XML:
<icons>
<icon image="Denver_test_icon.png" tooltip="Denver Icon Test" header="test header" content="Test Paragraph. Greeked:. Suspendisse condimentum sagittis luctus." />
</icons>Hi there.
I am currently trying to create a 3d carousel using AS2 and XML. I've made a lot of progress, but there ar e few things I am still struggling with and was hopoing that someone here could please steer me in the right direction.
Here is a URL where the Carousel can be found:
http://iongeo.com/ru_innovation_test_dev/carousel_test.html
Here are a few of the things I am wondering:
1. I would like to be ablle to add a back button movide clip, similar to how the tooltip movie clip is presented now; this movie clip would be able to allow users to go back home to the caousel. I can't seem to get it to load correctly however, I would imagine that it would be set up similarly to how the tooltip icon is set up now, but to be able to have an alpha of 100 when the text is loaded in.
2. I was also wondering how I mihgt be able to add links to my .xml document to be able to call in URLs on the web. I've tried several things using the CDATA approach, but can't seem to get it to work.
I would greatly appreciate any assistance privded and am very greatful for any consideration thac ould be provided. Please let me know if there is anything htat I should clarify on.
Below is my code for AS2 and XML so that you might see how things are currently working.
import mx.utils.Delegate;
import mx.transitions.Tween;
import mx.transitions.easing.*;
var numOfItems:Number;
var radiusX:Number = 200;
var radiusY:Number = 75;
var centerX:Number = 300;
var centerY:Number = 150;
var speed:Number = 0.00;
var perspective:Number = 20;
var home:MovieClip = this;
theText._alpha = 0;
theHeader._alpha = 0;
var tooltip:MovieClip = this.attachMovie("tooltip","tooltip",8000);
tooltip._alpha = 0;
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function()
var nodes = this.firstChild.childNodes;
numOfItems = nodes.length;
for(var i=0;i<numOfItems;i++)
var t = home.attachMovie("item","item"+i,i+1);
t.angle = i * ((Math.PI*2)/numOfItems);
t.onEnterFrame = mover;
t.toolText = nodes[i].attributes.tooltip;
t.content = nodes[i].attributes.content;
t.header = nodes[i].attributes.header;
t.icon.inner.loadMovie(nodes[i].attributes.image);
t.r.inner.loadMovie(nodes[i].attributes.image);
t.icon.onRollOver = over;
t.icon.onRollOut = out;
t.icon.onRelease = released;
function over()
//BONUS Section
home.tooltip.tipText.text = this._parent.toolText;
home.tooltip._x = this._parent._x;
home.tooltip._y = this._parent._y - this._parent._height/2;
home.tooltip.onEnterFrame = Delegate.create(this,moveTip);
home.tooltip._alpha = 100;
function out()
delete home.tooltip.onEnterFrame;
home.tooltip._alpha = 0;
function released()
//BONUS Section
home.tooltip._alpha = 100;
for(var i=0;i<numOfItems;i++)
var t:MovieClip = home["item"+i];
t.xPos = t._x;
t.yPos = t._y;
t.theScale = t._xscale;
delete t.icon.onRollOver;
delete t.icon.onRollOut;
delete t.icon.onRelease;
delete t.onEnterFrame;
if(t != this._parent)
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,0,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,0,1,true);
var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,100,0,1,true);
else
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,100,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,100,1,true);
var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,100,1,true);
var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,200,1,true);
var tw5:Tween = new Tween(theText,"_alpha",Strong.easeOut,0,100,1,true);
theText.text = t.content;
var s:Object = this;
tw.onMotionStopped = function()
s.onRelease = unReleased;
function unReleased()
var sou:Sound = new Sound();
sou.attachSound("sdown");
sou.start();
delete this.onRelease;
var tw:Tween = new Tween(theText,"_alpha",Strong.easeOut,100,0,0.5,true);
for(var i=0;i<numOfItems;i++)
var t:MovieClip = home["item"+i];
if(t != this._parent)
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,0,t.theScale,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,0,t.theScale,1,true);
var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,0,100,1,true);
else
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,100,t.theScale,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,100,t.theScale,1,true);
var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,t.xPos,1,true);
var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,t.yPos,1,true);
tw.onMotionStopped = function()
for(var i=0;i<numOfItems;i++)
var t:MovieClip = home["item"+i];
t.icon.onRollOver = Delegate.create(t.icon,over);
t.icon.onRollOut = Delegate.create(t.icon,out);
t.icon.onRelease = Delegate.create(t.icon,released);
t.onEnterFrame = mover;
function moveTip()
home.tooltip._x = this._parent._x;
home.tooltip._y = this._parent._y - this._parent._height/2;
xml.load("icons.xml");
function mover()
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s = (this._y - perspective) /(centerY+radiusY-perspective);
this._xscale = this._yscale = s*100;
this.angle += this._parent.speed;
this.swapDepths(Math.round(this._xscale) + 100);
this.onMouseMove = function()
speed = (this._xmouse-centerX)/8000;
// inactive mouse time (in seconds) to start slowing the carousel
var inactiveMouseTime:Number =1;
// rate of slowing carousel;
var speedDamp:Number = .4;
var speedI:Number;
var startSlowTO:Number;
this.onMouseMove = function(){
clearInterval(speedI);
clearTimeout(startSlowTO);
startSlowTO = setTimeout(startSlowF,inactiveMouseTime);
speed = (this._xmouse-centerX)/8000;
function startSlowF(){
clearInterval(speedI);
speedI=setInterval(speedF,2000);
function speedF(){
speed = speedDamp*speed;
if(speed<.1){
clearInterval(speedI);
speed=0;
Here is an example of how things are loaded from XML:
<icons>
<icon image="Denver_test_icon.png" tooltip="Denver Icon Test" header="test header" content="Test Paragraph. Greeked:. Suspendisse condimentum sagittis luctus." />
</icons> -
Generating PDF with XML and XSL
Hi, quick basic question...
I'm trying to generate pdf doc from xml with xsl.
I'm using following sample code from xml.apache.org
response.setContentType("application/pdf");
Driver driver =new Driver();
driver.setOutputStream(response.getOutputStream());
driver.setRenderer(Driver.RENDER_PDF);
Transformer transformer=TransformerFactory.newInstance()
.newTransformer(new StreamSource("foo.xsl"));
transformer.transform(xmlsource, new SAXResult(driver.getContentHandler()));
xmlSource is my regular xml that wants to be pdf.
is foo.xsl any regular xsl that I use to coonvert xml into html?
or is it some special xsl that is tailored for pdf.
Is this what is called xsl-fo?
Thanks
ILHi IL,
XSLT can translate XML to something else. It is most suited to transforming to another tree-like format (XML, HTML, etc.) but can be 'asked' to produce other kinds of output, flat text for example.
It is driven by an XSL file which is a series of patterns to match and output to produce.
This XSL file can be used to generate another XML document in which the nodes come from the Formatting Object namespace. These describe, in generic terms the format of an output document based upon the contents of the original XML.
The formatting object XML document can then be used as input to a formatting object XML processor which can generate PDF output from it.
You may want to check out:
www.w3c.org
for all the stuff on XML, XSL, XSLT, Formatting Objects, etc., and:
xml.apache.org
for imformation on Xalan, which is an XSL processor and FOP, which is a formatting object processor.
Hope that helps,
Peter. -
Working with XML and dates (i'm a begginer).
Hi everyone,
First of all, sorry for my english i'm a french user and I find no community in French to talk about my problem :
I have an XML file like this :
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<pubs>
<pub consumid="title" cover="21_07_2014/data/cover.jpg" coverthmb="21_07_2014/data/coverthmb.jpg" date="20140721" dummies="21_07_2014/ipad_dummies.xml" id="104263" name="" num=""
productid="GVNP" sproductid="$unavailable$"/>
<pub consumid="title" cover="22_07_2014/data/cover.jpg" coverthmb="22_07_2014/data/coverthmb.jpg" date="20140722" dummies="22_07_2014/ipad_dummies.xml" id="104302" name="" num=""
productid="GVNP" sproductid="$unavailable$"/>
<pub consumid="title" cover="23_07_2014/data/cover.jpg" coverthmb="23_07_2014/data/coverthmb.jpg" date="20140723" dummies="23_07_2014/ipad_dummies.xml" id="104303" name="" num=""
productid="GVNP" sproductid="$unavailable$"/>
<pub consumid="title" cover="24_07_2014/data/cover.jpg" coverthmb="24_07_2014/data/coverthmb.jpg" date="20140724" dummies="24_07_2014/ipad_dummies.xml" id="104186" name="" num=""
productid="GVNP" sproductid="$unavailable$"/>
<pub consumid="title" cover="25_07_2014/data/cover.jpg" coverthmb="25_07_2014/data/coverthmb.jpg" date="20140725" dummies="25_07_2014/ipad_dummies.xml" id="104404" name="" num=""
productid="GVNP" sproductid="$unavailable$"/>
<pub consumid="title" cover="26_07_2014/data/cover.jpg" coverthmb="26_07_2014/data/coverthmb.jpg" date="20140726" dummies="26_07_2014/ipad_dummies.xml" id="104265" name="" num=""
productid="GVNP" sproductid="$unavailable$"/>
<pub consumid="title" cover="28_07_2014/data/cover.jpg" coverthmb="28_07_2014/data/coverthmb.jpg" date="20140728" dummies="28_07_2014/ipad_dummies.xml" id="104422" name="" num=""
productid="GVNP" sproductid="$unavailable$"/>
<pub consumid="title" cover="29_07_2014/data/cover.jpg" coverthmb="29_07_2014/data/coverthmb.jpg" date="20140729" dummies="29_07_2014/ipad_dummies.xml" id="104443" name="" num=""
productid="GVNP" sproductid="$unavailable$"/>
<pub consumid="title" cover="30_07_2014/data/cover.jpg" coverthmb="30_07_2014/data/coverthmb.jpg" date="20140730" dummies="30_07_2014/ipad_dummies.xml" id="104444" name="" num=""
productid="GVNP" sproductid="$unavailable$"/>
<pub consumid="title" cover="31_07_2014/data/cover.jpg" coverthmb="31_07_2014/data/coverthmb.jpg" date="20140731" dummies="31_07_2014/ipad_dummies.xml" id="104462" name="" num=""
productid="GVNP" sproductid="$unavailable$"/>
<pub consumid="title" cover="01_08_2014/data/cover.jpg" coverthmb="01_08_2014/data/coverthmb.jpg" date="20140801" dummies="01_08_2014/ipad_dummies.xml" id="104482" name="" num=""
productid="GVNP" sproductid="$unavailable$"/>
<pub consumid="title" cover="02_08_2014/data/cover.jpg" coverthmb="02_08_2014/data/coverthmb.jpg" date="20140802" dummies="02_08_2014/ipad_dummies.xml" id="104502" name="" num=""
productid="GVNP" sproductid="$unavailable$"/>
<pub consumid="title" cover="04_08_2014/data/cover.jpg" coverthmb="04_08_2014/data/coverthmb.jpg" date="20140804" dummies="04_08_2014/ipad_dummies.xml" id="104522" name="" num=""
productid="GVNP" sproductid="$unavailable$"/>
<pub consumid="title" cover="05_08_2014/data/cover.jpg" coverthmb="05_08_2014/data/coverthmb.jpg" date="20140805" dummies="05_08_2014/ipad_dummies.xml" id="104542" name="" num=""
productid="GVNP" sproductid="$unavailable$"/>
<pub consumid="title" cover="06_08_2014/data/cover.jpg" coverthmb="06_08_2014/data/coverthmb.jpg" date="20140806" dummies="06_08_2014/ipad_dummies.xml" id="104543" name="" num=""
productid="GVNP" sproductid="$unavailable$"/>
<pub consumid="title" cover="07_08_2014/data/cover.jpg" coverthmb="07_08_2014/data/coverthmb.jpg" date="20140807" dummies="07_08_2014/ipad_dummies.xml" id="104562" name="" num=""
productid="GVNP" sproductid="$unavailable$"/>
<pub consumid="title" cover="08_08_2014/data/cover.jpg" coverthmb="08_08_2014/data/coverthmb.jpg" date="20140808" dummies="08_08_2014/ipad_dummies.xml" id="104582" name="" num=""
productid="GVNP" sproductid="$unavailable$"/>
<pub consumid="title" cover="09_08_2014/data/cover.jpg" coverthmb="09_08_2014/data/coverthmb.jpg" date="20140809" dummies="09_08_2014/ipad_dummies.xml" id="104602" name="" num=""
productid="GVNP" sproductid="$unavailable$"/>
<pub consumid="title" cover="11_08_2014/data/cover.jpg" coverthmb="11_08_2014/data/coverthmb.jpg" date="20140811" dummies="11_08_2014/ipad_dummies.xml" id="104622" name="" num=""
productid="GVNP" sproductid="$unavailable$"/>
<pub consumid="title" cover="12_08_2014/data/cover.jpg" coverthmb="12_08_2014/data/coverthmb.jpg" date="20140812" dummies="12_08_2014/ipad_dummies.xml" id="104642" name="" num=""
productid="GVNP" sproductid="$unavailable$"/>
<pub consumid="title" cover="13_08_2014/data/cover.jpg" coverthmb="13_08_2014/data/coverthmb.jpg" date="20140813" dummies="13_08_2014/ipad_dummies.xml" id="104643" name="" num=""
productid="GVNP" sproductid="$unavailable$"/>
<pub consumid="title" cover="14_08_2014/data/cover.jpg" coverthmb="14_08_2014/data/coverthmb.jpg" date="20140814" dummies="14_08_2014/ipad_dummies.xml" id="104665" name="" num=""
productid="GVNP" sproductid="$unavailable$"/>
<pub consumid="title" cover="15_08_2014/data/cover.jpg" coverthmb="15_08_2014/data/coverthmb.jpg" date="20140815" dummies="15_08_2014/ipad_dummies.xml" id="104702" name="" num=""
productid="GVNP" sproductid="$unavailable$"/>
<pub consumid="title" cover="16_08_2014/data/cover.jpg" coverthmb="16_08_2014/data/coverthmb.jpg" date="20140816" dummies="16_08_2014/ipad_dummies.xml" id="104723" name="" num=""
productid="GVNP" sproductid="$unavailable$"/>
<pub consumid="title" cover="18_08_2014/data/cover.jpg" coverthmb="18_08_2014/data/coverthmb.jpg" date="20140818" dummies="18_08_2014/ipad_dummies.xml" id="104782" name="" num=""
productid="GVNP" sproductid="$unavailable$"/>
</pubs>
I just want a simple thing : deleting the nodes where dates are more than 15 days (2 weeks). Like in this example, i only want nodes where dates are between "20140802" and "20140818". The result can be in an other XML file or directly applied
in the already existing XML file.
I'm a newbie using PowerShell, but i already found some interesting commands like these ones :
$xml = [xml](Get-Content E:\ipadpub.xml)
$datations = $xml.pubs.pub | % {$_.date -ge {(Get-Date).adddays(-15)}} | $xml.Save("E:\test.xml")
I'm testing many others commands but i'm unsucessful :(
Can anyone give me some good tips in a way to solve my problem, it would be nice.
Regards,
JfBack... I found something interesting by following your advices... this code get me a status (true or false) on exactly what i want.
The fact is that I can't delete "false" nodes i'm keeping searching but if you may help it would be nice ...
$xml = [xml](Get-Content J:\EpaperWeb\Kiosque_Prod\epaper\xml_epaper\HAVP\ipad_publications.xml)
$Date = Get-Date
$DateStr = $Date.Adddays(-15)
$DateStr = $DateStr.ToString("yyyyMMdd")
$xml.pubs.pub | % {$_.date -le $DateStr}
If ($xml.pubs.pub | % {$_.date -le $DateStr})
$node = $xml.SelectSingleNode("//pubs/pub")
[Void]$node.ParentNode.RemoveChild($node)
$xml.Save("J:\test.xml")
In bold here are the false code lines :( -
Need help with xml and combo boxes
Basically what im doing is a ui for a electronic book.
The book is broken into 3 parts and each part has its own set
of chapters.
My xml schema is pasted below.
And what i would like is to have two comboBoxes .
The first one would list the names of the parts available,
ie.. Part I, Part II, Part III.
the Second one would list the chapters avalable under that
part. For example, If Part i, is sected then the secodn combo box
would list chapter 1-5, while if the second part is selected, the
second combo box would list chapters 6-10.
Im using flash 8 pro, and the xmlconnector and comboboxes.
Maybe there is an easier way. PLEASE HALLP! This is driving me
nuts.
XML Schema:Hi
I have just done this for another guy in this forum, I can
send you an example using UI Components - 3 Comboboxes each shows
the sub-options of its parent, one more than what you want. The
secret is in the construct of the XML file and how this creates the
correct Schema for binding.
Post me an email address and I can send you the files.
Maybe you are looking for
-
K8N DIamond Plus- 4 sticks of memory problem
I have a new Opteron 180 with a K8N Diamond plus mb. I am thinking about getting another 2g of memory to run with my current 2g of 3200 memory to speed up Vista even more. I thought the new chips could run 4 sticks of memory at 400 with a command ra
-
Why can't I make call to parse HTML from inside a Thread?
This is driving me crazy. With a defined HTMLEditorKit.ParserCallback object "callback", I am attempting to parse an HTML document retrieved from a URL by using: new ParserDelegator().parse(new InputStreamReader(url.openStream( )), callback, true); I
-
TS3293 In different applications sometimes I can't make any zoom out or in?
I have problem with some application on my iPad when no zoom out or in works!
-
ItemFocusOut not catching "TAB" key in Datagrid edited cell?
In DataGrid, "keyUp" can catch "TAB" key when it is pressed, but the Keyboard event has less information needed. I tried itemFocusOut, but it seems DataGridEvent would not catch it. Any tips on how to make "TAB" key generate DataGridEvent or similar
-
I need an idea how to place multiple videos on one page
Multiple videos on one page in Muse neded for a video portfolio.. Anyone got a great idea how this can be done please. (or direct me to a tutorial link - doing one is all I can find) I am happy with either embedded or Menu linked on objects to videos