Date Filtering with XML data

I'm displaying events in a spry :repeat region with my source
being XML.
The date is set in the XML like:
<event>
<name>EventName</name>
<desc>Christmas Eve</desc>
<stopdate>12/25/2007</stopdate>
</event>
How would I hide this event after its given <stopdate>
value?

<script>
function getCurrentDate(){
objToday = new Date();
year = objToday.getFullYear();
month = objToday.getMonth() + 1;
if ( month < 10 )
month = "0" + month;
day = objToday.getDate();
if ( day < 10 )
day = "0" + day;
strToday = day + "/" + month + "/" + year;
return strToday;
</script>
And maby use
<tr spry repeat>
<td spry:if="{stopdate} >
getCurrentDate()">{stopdate}</td>
</tr>
Something like that would do.
If not maby set the row to date EXAMPLE:
var ds1 = new
Spry.Data.XMLDataSet("myxml.xml","races/standings");
// Example of setting the type of one column:
ds1.setColumnType("start", "date");
I think that is what u want.
It checks if the {stopdate} greater than the current date..
if it true, it will show the date. else it wont... ofcourse u can
change the operator of the spry if ;)

Similar Messages

  • Populating a PDF form with XML data

    Hi folks,
    I would like to create some pdf form template, populate it with xml data and output from it a pdf file.
    Can I do such thing using LiveCycle?
    Yair

    With the recent release Adobe changed the name to Adobe Digitial Enterprise Platform (ADEP)..
    http://www.adobe.com/solutions/customer-experience/enterprise-platform.html
    ADEP server software comes with lot of services to help with many solutions for the enterprises, so it would be better to call the Adobe Sales team and discuss your needs and they will be best people to suggest what suits your company requirements.
    Thanks
    Srini

  • XmlDataProvider .... is gone completely in my Xaml file. Why? How many different ways to deal with xml data source through WPF

    I followed a procedure described in a book.
    1. insert "Inventory.xml" file to a project "WpfXmlDataBinding" .
    2. add the XML data source through the data panel of "blend for 2013", named it "InventoryXmlDataStore" and store it in the current document.
    3. dragged and droppped the nodes from the Data panel onto the artboard.
    Then I checked my Xaml file against the one provided by the book
    Xaml file by the book:
    <Window.Resources>
    <!-- This part is missing in my xaml file --><XmlDataProvider x:Key="InventoryDataSource"
    Source="\Inventory.xml"
    d:IsDataSource="True"/>
    <!-- This part is missing in my xaml file -->
    <DataTemplate x:Key="ProductTemplate">
    <StackPanel>
    <TextBlock Text="{Binding XPath=@ProductID}"/>
    <TextBlock Text="{Binding XPath=Cost}"/>
    <TextBlock Text="{Binding XPath=Description}"/>
    <CheckBox IsChecked="{Binding XPath=HotItem}"/>
    <TextBlock Text="{Binding XPath=Name}"/>
    </StackPanel>
    </DataTemplate>
    </Window.Resources>
    <Grid>
    <ListBox HorizontalAlignment="Left"
    ItemTemplate="{DynamicResource ProductTemplate}"
    ItemsSource="{Binding XPath=/Inventory/Product}"
    Margin="89,65,0,77" Width="200"/>
    </Grid>
    my Xaml file:
    <Window x:Class="WpfXmlDataBinding.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Height="922" Width="874">
    <Window.Resources>
    <DataTemplate x:Key="ProductTemplate">
    <StackPanel>
    <TextBlock Text="{Binding XPath=@ProductID}"/>
    <TextBlock Text="{Binding XPath=Cost}"/>
    <TextBlock Text="{Binding XPath=Description}"/>
    <CheckBox IsChecked="{Binding XPath=HotItem}"/>
    <TextBlock Text="{Binding XPath=Name}"/>
    </StackPanel>
    </DataTemplate>
    </Window.Resources>
    <Grid DataContext="{Binding Source={StaticResource InventoryXmlDataStore}}">
    <ListBox HorizontalAlignment="Left" Height="370"
    ItemTemplate="{DynamicResource ProductTemplate}"
    ItemsSource="{Binding XPath=/Inventory/Product}"
    Margin="65,55,0,0" VerticalAlignment="Top" Width="270"/>     
        </Grid>
    </Window>
    All looks quite the same except the <XmlDataProvider ....> part under <Window.Resources>, which is gone completely in my Xaml file.
    1, Why?
    2, How many different ways to deal with xml data source through WPF?
    Thanks, guys.
    (ps My "WpfXmlDataBinding" runs without problem through.)

    Never do yourself down Richard.
    Leave that to other people.
    It's quite common for smart developers to think they're not as good as they are.
    I coach a fair bit and it's a surprisingly common feeling.
    And to repeat.
    Never use anything ends .. provider.  They're for trivial demo apps.  Transform xml into objects and use them.  Write it back as xml.  Preferably, use a database.
    You want to read a little mvvm theory first.
    http://en.wikipedia.org/wiki/Model_View_ViewModel
    Whatever you do, don't read Josh Smiths explanation.  I used to recommend it but it confuses the heck out newbies. Leave that until later.
    Laurent Bugnion did a great presentation at mix10.  Unfortunately that doesn't seem to be working on the MS site, but I have a copy.  Download and watch:
    http://1drv.ms/1IYxl3z
    I'm writing an article at the moment which is aimed at beginners.
    http://social.technet.microsoft.com/wiki/contents/articles/30564.wpf-uneventful-mvvm.aspx
    The sample is just a collection of techniques really.
    I have a sample which involves no real data but is intended to illustrate some aspects of how viewmodels "do stuff" and how you use datatemplates to generate UI.
    I can't remember if I recommended it previously to you:
    https://gallery.technet.microsoft.com/WPF-Dialler-simulator-d782db17
    And I have working samples which are aimed at illustrating line of business architecture.  This is an incomplete step by step series but I  think more than enough to chew on once you've done the previous stuff.
    http://social.technet.microsoft.com/wiki/contents/articles/28209.wpf-entity-framework-mvvm-walk-through-1.aspx
    The write up for step2 is work in progress.
    https://gallery.technet.microsoft.com/WPF-Entity-Framework-MVVM-78cdc204
    Hope that helps.
    Recent Technet articles: Property List Editing;
    Dynamic XAML

  • How to populate BusinessObjects metadata repository with .xml data?

    Can we populate BusinessObjects metadata Repository with .xml data? If yes can you please share some document or link on how to do that?

    Can we populate BusinessObjects metadata Repository with .xml data? If yes can you please share some document or link on how to do that?

  • Populating ComboBox with XML data

    Hi there,
    Probably the most basic question, but I'm having a hard time with this...
    Trying to populate the ComboBox with XML data as a dataProvider.
    Here is the code snippet:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                    layout="vertical"
                    creationComplete="baseDataRequest.send()">
        <mx:Script>
            <![CDATA[
                import mx.collections.XMLListCollection;
                import mx.rpc.events.ResultEvent;
                [Bindable]
                private var baseDataXML:XML;
                private function baseResultHandler(event:ResultEvent):void
                    baseDataXML = event.result.node.child as XML;
            ]]>
        </mx:Script>
        <mx:HTTPService id="baseDataRequest"
                        useProxy="false"
                        resultFormat="e4x"
                        result="baseResultHandler(event)"
                        url="XML_URL"/>
        <mx:ComboBox id="comboDemo"
                     width="390"
                     dataProvider="{baseDataXML}"
                     labelField="NodeName"/>
    </mx:Application>
    And that returns nothing, basically. I know the XML is being pulled, because if I do this:
    baseDataXML = event.result as XML;
    then I just see a single item in my ComboBox, with full XML content.
    How do I populate the ComboBox with XML contents?
    XML example:
    <root>
        <node>          <child>Child1</child>
              <child>Child2</child>
         </node>
    </root>
    Question: how do I populate the ComboBox with XML data nodes? I need <child> content to be the labelField of each combo box item...
    Thanks!
    K

         <mx:Script>
              <![CDATA[
                   var baseDataXML:XML = <root><node><child>Child1</child><child>Child2</child></node></root>;
              ]]>
         </mx:Script>
         <mx:ComboBox id="comboDemo"
                     width="390"
                     dataProvider="{baseDataXML.node.child}"
                     labelField="NodeName"/>
    Don't do:
    baseDataXML = event.result.node.child as XML;
    Instead just do:
    baseDataXML = XML(event.result);
    And in your combo:
    dataProvider="{baseDataXML.node.child}"

  • Error in viewing data in a data template with multiple data sources

    Hello,
    I have designed a data template with two data sources.One is from DEPARTMENTS table and the other datasource is a xml file.Following is the code for the data template :
    <dataTemplate name="EmployeeListing" dataSourceRef="demo">
    <parameters>
    <parameter name="p_DEPTNO" dataType="character" defaultValue="20"/>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[SELECT DEPARTMENT_NAME,DEPARTMENT_ID,LOC from DEPARTMENTS]]>
    </sqlStatement>
    <xml name="empxml" expressionPath=".//ROW[DEPARTMENT_NAME =$DEPARTMENT_NAME]">
    <url method="GET" realm="" username="" password="">file:///D:\OraHome_1\xmlp\XMLP\DemoFiles\Employee Salary Report.xml</url>
    </xml>
    /dataQuery>
    </dataTemplate>
    The problem is when i am trying to view the data, only data from SQL Query Q1 is getting displayed and the data from Employee xml is not at all getting displayed.
    Could anyone please let me know what i am missing?
    Thanks
    Nutan
    Edited by: user609971 on Oct 23, 2008 8:06 AM

    This is from Documenation sample....
    Did you see the data structure section, where you say, how you wanted the columns ?
    <?xml version="1.0" encoding="WINDOWS-1252" ?>
    <dataTemplate name="Employee Listing" description="List of Employees" v
    ersion="1.0">
    <parameters>- Defines a single parameter for the Department Number
    - with default of 20:
    <parameter name="p_DEPTNO" dataType="character"
    defaultValue="20"/>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[SELECT DEPTNO,DNAME,LOC from dept
                      order by deptno]]>
    </sqlStatement>
    <xml name="empxml" expressionPath=".//ROW[DEPTNO=$DEPTNO]"> - Defines name
    - and link to DEPTNO in Q1
    <url method="GET" realm="" username="" password="">
    file:///d:/dttest/employee.xml</url> - Defines url for xml data
    </xml>
    </dataQuery>-
    <dataStructure>- The following section specifies the XML hierarchy
    - for the returning data:
    <group name="G_DEPT" source="Q1"
    <element name="DEPT_NUMBER" value="DEPTNO" />
    <element name="DEPT_NAME" value="DNAME"/>
    - This creates a summary total at the department level based
    - on the salaries at the employee level for each department:      
    <element name="DEPTSAL" value="G_EMP.SALARY"
    function="SUM()"/>
              <element name="LOCATION" value="LOC" />
    <group name="G_EMP" source="empxml">
    <element name="EMPLOYEE_NUMBER" value="EMPNO" />
    <element name="NAME" value="ENAME"/>
    <element name="JOB" value="JOB" />
    <element name="MANAGER" value="MGR"/>
    <element name= "HIREDATE" value="HIREDATE"/>
    <element name="SALARY" value="SAL"/>
    </group>     
    </group>
    </dataStructure>
    </dataTemplate>

  • Query To update a date column with a date of my interest

    All,
    How to update a column in a table which is in date format with a date of my interest??
    Pls suggest.

    Please detail :
    1. what exactly you are trying to do
    2. what exactly you have done
    Nicolas.

  • Not able to save date column with custom date format. in OBIEE 11g

    Hi,
    I have migrated one report from OBIEE 10g to 11g. There is a date column with customized date format(i.e. Default format is 'dd-MMM-yyyy' and I have used 'MMM-yyyy').
    But when I use this custom format and try to save the report in 11g its giving this below error.
    ''Catalog object privilege validation failed for user to path /shared/ALM BI/Finacial Results/History Income Statement Detail.
    You do not currently have sufficient privileges to save a report or dashboard page that contains HTML markup.
    This HTML might be present in column headings, table headings, text views, narrative views, the print header,
    or the print footer and must be removed before saving.''
    Please let me know what changes I need to do for this.
    Regards,
    Ambika Nanda.

    Hi ,
    privilage issues...check the security settings once..
    Thanks,
    Ananth

  • Filling bc travel data model with test data

    Hey i read somewhere that there is a app to fill the bc travel data model with test data.I been searching but havent found one in the preview version.Please help me if anyone knows how to get it done.Filling it manually is taking a whole lot of time.

    Go to the ABAP Editor (SE38) and execute the SAPBC_DATA_GENERATOR program. This program generates suitable sample data in the tables of the flight data application.

  • Filtering multiple-XML data model with parameters

    I have a data model that consists of a concatenation of 9 separate RSS feeds (weather information from 9 different cities coming from http://www.weather.gov/data/current_obs/????.xml, where ???? is the National Weather Service station ID). All of the feeds have exactly the same format. When I view the raw XML data, I see 9 different values of station_id and of every other tag. So the XML data looks fine. Now I'd like to be able to select one city at a time in an LOV dropdown.
    I've created a static LOV called Cities with the list of the 9 station ID's. I've created a parameter called city that is tied to that LOV.
    What I can't figure out is how to tie the selected city to the station_id field in the concatenated XML dataset.
    I've tied adding a parameter to each rss data set, entering each city's 4-character station ID into its Parameter Name field, and of course choosing city as the parameter. For example, the Parameters section for the Amarillo rss feed would show a Name of KAMA and a Value (Parameter) of city. While this seems logical, selecting the parameter on the View screen doesn't change the display.
    Is there a way to accomplish this?

    Ahhh, post as in "e-mail". DOH!
    E-mailed to you.

  • How to Create a Table in Oracle with XML data type.

    Dear ALL,
    What are the requirements for creating a table with xml datatype in Oracle: The steps would help very much to know the scripting of the table and how to query and either insert/update and remove data from that table.
    Any help, direction, advise would be highly appreciated.
    Thanks.

    Reffer to this Note.243554.1.
    In a nut shell you will need to run catqm.sql

  • Data template with xml over http

    Hi!
    I have a data template what should get data from xml file.
    <dataTemplate name="ccbXML" description="For xml output">
    <properties>
    <property name="debug_mode" value="on"/>
    <property name="include_parameters" value="true"/>
    <property name="include_null_Element" value="true"/>
    <property name="scalable_mode" value="on"/>
    <property name="db_fetch_size" value="1000"/>
    </properties>
    <dataQuery>
    <xml name="DATA_XML">
    <url method="GET" realm="" username="" password="">http://my.site.sise/00000000070000000001.xml</url>
    </xml>
    </dataQuery>
    </dataTemplate>
    The result is:
    <CCBXML>
         <LIST_data_xml></LIST_data_xml>
    </CCBXML>
    When I use:
    <url method="GET" realm="" username="" password="">file:///D:\files\result.xml</url>
    then I get a parsal result from the XML (it is not structuated and it does not show all the xml content, only random tag's).
    In the end it is not possible for me to use the file protocol because the xml is generated dynamically in a http page. Is it even possible to use the http protocol in data template? Or is anything else wrong with my data template that I'm not getting the right result (even with file:///)?
    I work BI Publisher Enterprise Release 10.1.3.4
    Evelyn

    Could u please send the working example for http binding on SOA Suite 11 g.
    Thanks and Regards,
    Anil verma

  • Error message when using Spry Data set with XML

    Hi,
    I have what i see as a big problem, might just be me being
    dumm, but here we go.
    When I try to use the feature of spry XML Data Set and insert
    spry table I get error message when trying it in IE 7.
    There are even a problem when I use fireworks automated slide
    show function, where you can choose to use the Spry/XML gallery
    feature.
    The error message I get everytime (incl the auto gallery in
    fireworks) is:
    The tag: "html" doesn't have an attribute: "xmlns:spry" in
    currently active versions.[XHTML 1.0 transitional]
    The tag: "div" doesn't have an attribute: "spry:region" in
    currently active versions.[XHTML 1.0 transitional]
    The tag: "th" doesn't have an attribute: "spry:sort" in
    currently active versions.[XHTML 1.0 transitional]
    and so on.
    What´s wrong?!

    Hello barvid,
    Ok, let's take each problem step by step:
    1. The first error you see in the browser: " Exception while
    loading ..." normally appears when you try to load files that are
    not permitted by the browser security model. This means the XML
    file you try to load is located on a different server than your
    HTML which is not allowed. The browser is not permitting to load
    any files that are not in the same domain as the current page
    because of the complex security risks. You'll have to either get
    the XML file from its original location and save it in your website
    or use a proxy on your web server that should request that file
    from the external server and send it to the browser as an XML from
    the same domain as the HTML origin.
    1.2 The "Exception while loading ..." error you see is a
    generic error and my previous advise is based on my experience. In
    case this is not your scenario you'll have to open the SpryData.js
    and around line 112 you'll see the following code:
    Spry.Debug.reportError("Exception caught while loading " +
    url + ": " + e);
    Please change this line with the following line of code:
    Spry.Debug.reportError("Exception caught while loading " +
    url + ": " + (e.message?e.message:e));
    to obtain a more verbose error message that may clarify the
    reasons of your errors.
    2. The problems you describe are not browser errors but they
    are w3c validation errors. At this point the XHTML standard allows
    every application that define custom namespace attributes to also
    link a DTD to the page so the page to continue to be valid.
    Unfortunately at this point this feature is not correctly supported
    by the FF and IE so we wrote an articles about how you should
    link
    the Spry DTD to your page so the validator understand the
    custom attributes Spry use. You'll find inside the full description
    of the problems and all the technical details you'll need to know
    to solve this issue.
    Regards,
    Cristian

  • PDF form with XML data connection comes up blank at run time

    Hello All,
    I am a newbie to ADOBE Livecycle 9, but am very proficient in C#.  I would like to request for your guidance on the following issue.
    We have a desktop application in C#, WPF, Sqlserver. The requirement is to launch a Livecycle form from the application for the user to read/edit/save data
    I have done this much so far -
    Downloaded trial version of Livecycle 9
    Developed a interactive PDf form
    Created an XML based data connection. Generated fields on the form using the fields from this connection.
    Set the .XML file as preview source for the form
    the controls on the form are boumd to the xml data source
    In design mode, the form works fine, it displays my data correctly
    I have created a WPF form with a button. On click of this button, I call the Process.Start(pdf-file-path). My pdf is launched properly
    I have added a combo box to my WPF form. I select a parameter from this, then call a stored procedure which returns me a datatable depending on parameter passed
    Using the returned datatable, I have used the datatable.writexml and datatable.writexmlschema to create my XML and XSD files. as mentioned above, this xsd is used to create the data connection for the PDF and the XML for the preview source
    This is what I want to do -
    Launch the PDF from my WPF form, pre-populated with the newly created XML data from my WPF form.
    So basically, as the user changes the selection criteria from the combo box, the XML file data will change and the PDF file will be launched each time with new data.
    The XSD format will always be constant
    Problem -
    My XML and XSD get created properly, my PDF launches, but it is empty
    If I change my selection criteria and run the WPF application, and then open the PDF in design mode, it asks me whether it should refresh the XML source. This means that the PDF form is connecting correctly to the XML source
    So why then, does the form come up empty at run time?
    What link am I missing?
    I have found some sites that help using Web applications, but nothing for desktop applications. It would be fantastic if you could point me to some help for developing Livecycle forms with C# / SQLServer
    Your help in this case will be highly appreciated.
    Thanks and Regards

    Oops, something happended with the above post. I will try again... I have tried your suggestion but I still get the same garbled XML (with data repeated and some values "cut in half".<br /><br />Here is what I get after decode-service and extract-to-XML-service. This is just the first barcode, the others are similar, sorry for the poor formatting, but I get a CDATA tage infront of the "istensen" value.<br />                                                              <br />CDATA:istensen</fld_ForMellemEfterNavn<br />><fld_VejNRpostByEnLinie<br />>Superroad 99, 1330 Supertown</fld_VejNRpostByEnLinie<br />><fld_PrivatTelefonnummer<br />>20724283</fld_PrivatTelefonnummer<br />></sub_Person<br />></sub_PktA<br />><fld_BlanketNr<br />>kb0371ff</fld_BlanketNr<br />><fld_BarcodeCount<br />/></form1<br />>/sub_Adresse<br />><sub_Person<br />><fld_ForMellemEfterNavn>Kim Christensen</fld_ForMellemEfterNavn<br />><fld_VejNRpostByEnLinie<br />> Superroad 99, 1330 Supertown </fld_VejNRpostByEnLinie<br />><fld_PrivatTelefonnummer<br />>20724283</fld_PrivatTelefonnummer<br />></sub_Person<br />></sub_PktA<br />><fld_BlanketNr<br />>kb0371ff</fld_BlanketNr<br />><fld_BarcodeCount<br />/></form1<br /><br />Obviously this is not a legal xml-string, so I can do nothing about it.<br /><br />I have tried using a custom .NET component (ClearImage) for reading the same form (with the barcode) I get the correct data out from the barcodes. So I guess something is wrong with the decode-service in Barcoded Forms ES when I use compressed XML. But I can conclude since the ClearImage component can read the barcodes that they are compressed correctly.<br /><br />Can you help me with getting further with this problem?<br /><br />Sincerely<br />Kim

  • CollapsiblePanel with XML data source

    I've been working with the CollapsiblePanel for the past two
    nights. I can't make the panel collapse at runtime when I have XML
    data attached.
    I validated by downloading one of the Adobe Lab
    CollapsiblePanel samples. I validated that I could make the sample
    work from my Dreamweaver CS3 environment. Then, I added an XML data
    source and retested. The panel would not collapse. Then, I took out
    the XML dataset and retested the CollapsiblePanel. It worked.
    Is this a design feature? I can't imagine this was designed
    to work this way. I'm trying to create a scrollable div that can
    collapse. I have everything working except the collapse feature.
    (BTW: I tried defining a spry:region and spry:detailregion, it
    didn't seem to matter.)
    CODE SNIPIT
    <div id="CollapsiblePanel1" class="CollapsiblePanel"
    spry:region="dsWeek">
    <div class="CollapsiblePanelTab">Standard Collapsible
    Panel</div>
    <div class="CollapsiblePanelContent">
    <p>{feature}</p>
    </div>
    </div>

    How does the xml data look like? in GML?
    If the xml data set is not too large, maybe you can add them (after your application has parsed them) as additional MapViewer GeoFeatures in a map request.
    Currently MapViewer (preview or production release of 9.0.4) does not support xml-only datasource.
    We will look into incorporating GML or other standard-based xml datasource for a future release of MapViewer.

Maybe you are looking for

  • Not able to install Oracle Client 11g R2 64 bit on Windows 7 Enterprise 64

    I am having issues. I get "Central Inventory is not locked" and Oracle 11g R2 just closes itself. I had some previous installations of Oracle, but I am unsure how to get rid of them all. I already removed the registry keys associated with Oracle. Any

  • A way to view your memory?

    hello all, so I saw recently that my hard drive space is getting rather crammed. and I am sure there is a ton of stuff I could delete, I just don't necessarily know what's really taking up the space. my question is, is there a way to easily view, the

  • Duplication when printing sapscript form

    i have created a sapscript that is supposed to be printing a statement but when printing it prints the first record twice what could be the problem , the text elements are being generated from  an internal table.

  • IDVD6.0.1 refuses to burn DVD onto DVD

    I have till today successfully burned dvd's, that play both on PAL and NTSC. All of a sudden I get a message that I need to put in a blank DVD, recordeable, while I popped several blanks in... At first I thought it was a faulty DVD, but it refuses on

  • What does the volume number mean?

    If I import a song and use "Get Info", under "Summary" there is a "Volume" setting at the bottom of the column on the left side that is different for every song. Exactly what does that number mean. Thank you so much.