Search Results

Search found 58802 results on 2353 pages for 'system xml'.

Page 65/2353 | < Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >

  • ASP.NET XML as Datasource error

    - by nekko
    Hello I am trying to use an XML as a datasource in ASP and then display it as a datagrid. The XML has the following format: <?xml version="1.0" encoding="UTF-8"?> <people type="array"> <person> <id type="integer"></id> <first_name></first_name> <last_name></last_name> <title></title> <company></company> <tags> </tags> <locations> <location primary="false" label="work"> <email></email> <website></website> <phone></phone> <cell></cell> <fax></fax> <street_1/> <street_2/> <city/> <state/> <postal_code/> <country/> </location> </locations> <notes></notes> <created_at></created_at> <updated_at></updated_at> </person> </people> When I try to run the simple page I receive the following error Server Error in '/' Application. The data source for GridView with id 'GridView1' did not have any properties or attributes from which to generate columns. Ensure that your data source has content. Here is my page code <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="shout._Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/App_Data/people.xml" XPath="people/person"></asp:XmlDataSource> <asp:GridView ID="GridView1" runat="server" AllowPaging="True" DataSourceID="XmlDataSource1"> </asp:GridView> </div> </form> </body> </html> Please help. Thanks in advance.

    Read the article

  • Changes to JBoss web.xml have no effect

    - by sixtyfootersdude
    I just added this to my web.xml on my JBOSS server. But it had no effect. I am still allowed to connect to ports that do not use bi-directional certificate exchange. Anyone have an ideas? <!-- Force SSL for entire site as described here: http://wiki.metawerx.net/wiki/ForcingSSLForSectionsOfYourWebsite --> <security-constraint> <!-- defines resources to be protected (in this case everything)--> <web-resource-collection> <!-- name for the resource, can be anything you like --> <!-- Question: is this referenced anywhere else? --> <web-resource-name> Entire Application </web-resource-name> <!-- protect the entire application --> <url-pattern> /* </url-pattern> </web-resource-collection> <!-- defines protection level for protected resource --> <user-data-constraint> <!-- data cannot be observed or changed --> <!-- how it works in tomcat: --> <!-- if (set to integral or confidential && not using ssl) --> <!-- redirect sent to client, redirecting them to same url --> <!-- but using the port defined in the redirect port --> <!-- attribute in the <Connector> element of server.xml --> <!-- default is 443, so in other words user is redirected --> <!-- to same page using ssl. --> <!-- BUT it is differnt for JBOSS!! See this link: http://wiki.metawerx.net/wiki/ForcingSSLForSectionsOfYourWebsite --> <transport-guarantee> CONFIDENTIAL </transport-guarantee> </user-data-constraint> </security-constraint> <login-config> <!-- Client-side SSL certificate based authentication. The cert is passed to the server to authenticate --> <!-- I am pretty sure that CLIENT-CERT should have a dash NOT an underscore see: http://www.mail-archive.com/[email protected]/msg139845.html --> <!-- CLIENT-CERT uses a client's AND server's certificates. See: http://monduke.com/2006/01/19/the-mysterious-client-cert/ --> <auth-method> CLIENT-CERT </auth-method> </login-config> Update Actually it appears that I have made an error in my original posting. The web.xml does block users from connecting to the webservice using http (port C below). However users are still allowed to connect to ports that do not force users to authenticate themselves (port B). I think that users should be able to connect to port A (it has clientAuth="true") but I dont think that people should be able to connect to port B (it has clientAuth="false"). Excerpt from server.xml <Connector port="<A>" ... SSLEnabled="true" ... scheme="https" secure="true" clientAuth="true" keystoreFile="... .keystore" keystorePass="pword" truststoreFile="... .keystore" truststorePass="pword" sslProtocol="TLS"/> <Connector port="<B>" ... SSLEnabled="true" ... scheme="https" secure="true" clientAuth="false" keystoreFile="... .keystore" keystorePass="pword" sslProtocol = "TLS" /> <Connector port="<C>" ... />

    Read the article

  • Need some help with my XML Schema.

    - by Airjoe
    I'm using Qt C++ and am reading in an XML file for data. I want to ensure the XML file contains valid elements, so I began to write an XML Schema to validate against (Qt doesn't support validating against a DTD). The problem is, I'm not sure if my Schema itself is valid, and I can't seem to find an actual XSD validator. I tried using the official w3c validator at http://www.w3.org/2001/03/webdata/xsv, but it's giving me blank output. Would anyone know of a decent XSD validator, or perhaps be willing to look over the following manually? <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:element name="ballot"> <xs:complexType> <xs:sequence> <xs:element name="races"> <xs:complexType> <xs:element name="race" minOccurs="1" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="rtitle" minOccurs="1" maxOccurs="1" type="xs:string"/> <xs:element name="candidates" minOccurs="1" maxOccurs="1"> <xs:complexType> <xs:element name="candidate" minOccurs="1" maxOccurs="10"> <xs:complexType> <xs:element name="candname" minOccurs="1" maxOccurs="1" type="xs:string"/> <xs:element name="candparty" minOccurs="1" maxOccurs="1" type="xs:string"/> </xs:complexType> </xs:element> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:complexType> </xs:element> <xs:element name="propositions"> <xs:complexType> <xs:element name="proposition" minOccurs="1" maxOccurs="unbounded"> <xs:complexType> <xs:element name="ptitle" minOccurs="1" maxOccurs="1" type="xs:string"/> <xs:element name="pdesc" minOccurs="1" maxOccurs="1" type="xs:string"/> </xs:complexType> </xs:element> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> Please let me know what you think, I appreciate it!

    Read the article

  • Import Twitter XML into Visual Basic

    - by ct2k7
    Hello, I'm trying to import an XML that's provided by twitter into a readable format in Visual Basic. XML looks like: <?xml version="1.0" encoding="UTF-8" ?> - <statuses type="array"> - <status> <created_at>Mon Jan 18 20:41:19 +0000 2010</created_at> <id>111111111</id> <text>thattext</text> <source><a href="http://www.seesmic.com/" rel="nofollow">Seesmic</a></source> <truncated>false</truncated> <in_reply_to_status_id>7916479948</in_reply_to_status_id> <in_reply_to_user_id>90978206</in_reply_to_user_id> <favorited>false</favorited> <in_reply_to_screen_name>radonsystems</in_reply_to_screen_name> - <user> <id>20193170</id> <name>personname</name> <screen_name>screenname</screen_name> <location>loc</location> <description>desc</description> <profile_image_url>http://a3.twimg.com/profile_images/747012343/twitter_normal.png</profile_image_url> <url>myurl</url> <protected>false</protected> <followers_count>97</followers_count> <profile_background_color>ffffff</profile_background_color> <profile_text_color>333333</profile_text_color> <profile_link_color>0084B4</profile_link_color> <profile_sidebar_fill_color>ffffff</profile_sidebar_fill_color> <profile_sidebar_border_color>ababab</profile_sidebar_border_color> <friends_count>76</friends_count> <created_at>Thu Feb 05 21:54:24 +0000 2009</created_at> <favourites_count>1</favourites_count> <utc_offset>0</utc_offset> <time_zone>London</time_zone> <profile_background_image_url>http://a3.twimg.com/profile_background_images/76723999/754686.png</profile_background_image_url> <profile_background_tile>true</profile_background_tile> <notifications>false</notifications> <geo_enabled>true</geo_enabled> <verified>false</verified> <following>false</following> <statuses_count>782</statuses_count> <lang>en</lang> <contributors_enabled>false</contributors_enabled> </user> <geo /> <coordinates /> <place /> <contributors /> </status> </statuses> Now, I want to display it in a panel that automatically refresh after a certain period, however, I only want to pick out certain bits of info from that xml, such as profile_image_url and text and created_at. You can guess how the data will be formatted, much like that presented in TweetDeck and other Twitter clients. I'm quite new to Visual Basic, so how could I do this? Thanks

    Read the article

  • Remove all nodes from xml excluding specific nodes using XSLT

    - by Grinner
    Hi, I have a bunch of xml files with a varying amount of data nodes in them and I want to change the files using XSLT to include only specific nodes. Example: <?xml version="1.0" encoding="UTF-8"?> <SomeName> <identifier> <UID> 1234 </UID> </identifier> <MainNode1> <SubNode1> <Subnode1a>DATA1a0</Subnode1a> </SubNode1> <SubNode1> <Subnode1a>DATA1a1</Subnode1a> </SubNode1> <SubNode1> <Subnode1a>DATA1a2</Subnode1a> </SubNode1> </MainNode1> <MainNode2> <SubNode2> <Subnode2a>DATA2a0</Subnode2a> </SubNode2> </MainNode2> <MainNodeIDONTCARE> <SubnodeWhatever> </SubnodeWhatever> </MainNodeIDONTCARE> <MainNodeuseless> <SubnodeWhatever> </SubnodeWhatever> </MainNodeuseless> <MainNodewhatever> <SubnodeWhatever> </SubnodeWhatever> </MainNodewhatever> </SomeName> Now my final XML file should look like: <?xml version="1.0" encoding="UTF-8"?> <SomeName> <identifier> <UID> 1234 </UID> </identifier> <MainNode1> <SubNode1> <Subnode1a>DATA1a0</Subnode1a> </SubNode1> <SubNode1> <Subnode1a>DATA1a1</Subnode1a> </SubNode1> <SubNode1> <Subnode1a>DATA1a2</Subnode1a> </SubNode1> </MainNode1> <MainNode2> <SubNode2> <Subnode2a>DATA2a0</Subnode2a> </SubNode2> </MainNode2> </SomeName> I've been trying to get it done with XSLT, but I can't seem to get it done. Thanks for any help.

    Read the article

  • Sorting an XML file through XSL

    - by jbugeja
    I have an XML file that I want to sort by an attribute. The file is structured as shown below: <wb xmlns:cf="http://www.macromedia.com/2004/cfform"> <a:form name="chart"> <a:input FIELDNUMBER="09" INDEX="2" LEFT="200" /> <a:input FIELDNUMBER="08" INDEX="3" LEFT="200" /> <a:fieldset FIELD="a" FIELDNAME="FieldSet1"> <a:input FIELDNUMBER="02" INDEX="4" LEFT="200" /> <a:select1 FIELDNUMBER="01" /> </a:fieldset> <a:fieldset FIELD="b" FIELDNAME="FieldSet1"> <a:input FIELDNUMBER="04" INDEX="7" LEFT="200" /> <a:select1 FIELDNUMBER="03" /> <a:fieldset FIELD="c" FIELDNAME="FieldSet1"> <a:input FIELDNUMBER="06" INDEX="8" LEFT="200" /> <a:input FIELDNUMBER="05" INDEX="6" LEFT="200" /> </a:fieldset> </a:fieldset> </a:form> </wb> I would like to sort the above XML all throughout by @fieldnumber, but at the same I want to keep the same structure of the XML. I have managed to sort other XML file but they did not have such nesting levels. Is this possible with XSL alone and if so how can this be done? The output should be as follows: <wb xmlns:cf="http://www.macromedia.com/2004/cfform"> <a:form name="chart"> <a:input FIELDNUMBER="08" INDEX="3" LEFT="200" /> <a:input FIELDNUMBER="09" INDEX="2" LEFT="200" /> <a:fieldset FIELD="a" FIELDNAME="FieldSet1"> <a:select1 FIELDNUMBER="01" /> <a:input FIELDNUMBER="02" INDEX="4" LEFT="200" /> </a:fieldset> <a:fieldset FIELD="b" FIELDNAME="FieldSet1"> <a:select1 FIELDNUMBER="03" /> <a:input FIELDNUMBER="04" INDEX="7" LEFT="200" /> <a:fieldset FIELD="c" FIELDNAME="FieldSet1"> <a:input FIELDNUMBER="05" INDEX="6" LEFT="200" /> <a:input FIELDNUMBER="06" INDEX="8" LEFT="200" /> </a:fieldset> </a:fieldset> </a:form> </wb> As another example, should the FIELDNUMBER 04 be changed to a value greater than 7 such as 10 (let's assume 10 in this example) then the output of the fieldset with FIELD value b becomes: <a:fieldset FIELD="b" FIELDNAME="FieldSet1"> <a:select1 FIELDNUMBER="03" /> <a:fieldset FIELD="c" FIELDNAME="FieldSet1"> <a:input FIELDNUMBER="05" INDEX="6" LEFT="200" /> <a:input FIELDNUMBER="06" INDEX="8" LEFT="200" /> </a:fieldset> <a:input FIELDNUMBER="10" INDEX="7" LEFT="200" /> </a:fieldset>

    Read the article

  • How to display same type of data from XML using XSLT

    - by MKS
    Hi Guys, I am using XSLT and XML. I have got below XML. <documentCountryInformation> <countryCode>US</countryCode> <countryName>United States</countryName> <sufficientDocumentation>Conditional</sufficientDocumentation> <sectionInformation> <sectionName>Health</sectionName> <documentParagraph paragraphId="23628"> <paragraphType>Requirement</paragraphType> <paragraphText> <p> Vaccination for <strong>yellow fever</strong> Persons without valid yellow fever certification, if required, are subject to quarantine for a period up to 6 days. </p> </paragraphText> </documentParagraph> </sectionInformation> </documentCountryInformation> <documentCountryInformation> <countryCode>IN</countryCode> <countryName>India</countryName> <sufficientDocumentation>Conditional</sufficientDocumentation> <sectionInformation> <sectionName>Health</sectionName> <documentParagraph paragraphId="23648"> <paragraphType>Requirement</paragraphType> <paragraphText> <p> Vaccination for <strong>Dengue fever</strong> Persons without valid yellow fever certification, if required, are subject to quarantine for a period up to 3 days. </p> </paragraphText> </documentParagraph> </sectionInformation> </documentCountryInformation> Above is the part of full xml and you can see there are two records of same type, now I have got the <countryName> in parameters of XSLT in above example my countryName parameter will contain this type of data "United States,India", Now I want to split the parameter data and further it will check the XML having same country name and display the data according, I mean there will be loop on country name and below is desired HTML. <div class="resultsContainer" id="divTransit"> <h3>Transit - United States (US)</h3> <p> Vaccination for <strong>yellow fever</strong> Persons without valid yellow fever certification, if required, are subject to quarantine for a period up to 6 days. </p> <h3>Transit - India (IN)</h3> <p> Vaccination for <strong>Dengue fever</strong> Persons without valid yellow fever certification, if required, are subject to quarantine for a period up to 3 days. </p> </div>

    Read the article

  • insert xml into sql server

    - by JonDog
    ok, so I know there are a bunch of other post on importing xml to sql server but I just cant seem to figure it out. I think my problem may have to do with having multi-levels. Can anyone help please. My xml, sql table, and the code i've tried. thanks in advance. <items> <item> <sku> <value> the_sku </value> </sku> <short_dis2> <value> short_discription2 <value/> </short_dis2> <short_dis1> <value> short_discription1 </value> </short_dis1> <title> <value> product_title </value> </title> <detailSpec> <value> detailed_specification_html </value> </detailSpec> <basicSpec> <value> basic_overview_html </value> </basicSpec> <basicSpecHeading> <value> besic_spec_heading </value> </basicSpecHeading> <detailSpecHeading> <value> detailed_specifications_heading </value> </detailSpecHeading> <model> <value> the_model_number </value> </model> <image_file_name> <value> the_image_url </value> </image_file_name> </item> ... CREATE TABLE [dbo].[products]( [sku] [nchar](15) NOT NULL, [model] [nvarchar](50) NULL, [title] [ntext] NULL, [short_dis1] [ntext] NULL, [short_dis2] [ntext] NULL, [basicSpecHeading] [ntext] NULL, [basicSpec] [ntext] NULL, [detailSpecHeading] [ntext] NULL, [detailSpec] [ntext] NULL, [image_file_name] [nchar](100) NULL INSERT INTO products (sku, short_dis2,short_dis1,title,detailSpec,basicSpec,basicSpecHeading,detailSpecHeading,model,image_file_name) SELECT X.product.query('sku').value('.', 'nchar(15)'), X.product.query('short_dis2').value('.', 'nvarchar(max)'), X.product.query('short_dis1').value('.', 'nvarchar(max)'), X.product.query('title').value('.', 'nvarchar(max)'), X.product.query('detailSpec').value('.', 'nvarchar(max)'), X.product.query('basicSpec').value('.', 'nvarchar(max)'), X.product.query('basicSpecHeading').value('.', 'nvarchar(max)'), X.product.query('detailSpecHeading').value('.', 'nvarchar(max)'), X.product.query('model').value('.', 'nvarchar(max)'), X.product.query('image_file_name').value('.', 'nvarchar(max)') FROM ( SELECT CAST(x AS XML) FROM OPENROWSET( BULK 'C:\users\me\desktop\xml_sample.xml', SINGLE_BLOB) AS T(x) ) AS T(x) CROSS APPLY x.nodes('Products/Product') AS X(product);

    Read the article

  • nested for-each loops in xml

    - by user1748443
    I'm new to XML. I'm trying to create table containing item details and another table to contain customer details for each order on a picklist. It seems like it should be straightforward but I just get a list of all items on all orders repeated by the number of orders. What am I doing wrong? (XSL code below...) <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" doctype-system="about:legacy-compat"/> <xsl:template match="/"> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"/> <link rel="stylesheet" type="css/text" href="style.css"/> <title>Orders</title> </head> <body> <xsl:for-each select="//order"> <table> <caption><h3>Order Information</h3></caption> <thead> <th align="left">Item Id</th> <th align="left">Item Description</th> <th align="left">Quantity</th> <th align="left">Price</th> </thead> <xsl:for-each select="//item"> <tr> <td align="left"><xsl:value-of select="itemId"/></td> <td align="left"><xsl:value-of select="itemName"/></td> <td align="left"><xsl:value-of select="quantity"/></td> <td align="left"><xsl:value-of select="price"/></td> </tr> </xsl:for-each> </table> <table> <caption><h3>Customer Information</h3></caption> <thead> <th align="left">Customer Name</th> <th align="left">Street</th> <th align="left">City</th> </thead> <xsl:for-each select="//item"> <tr> <td align="left"><xsl:value-of select="customerName"/></td> <td align="left"><xsl:value-of select="street"/></td> <td align="left"><xsl:value-of select="city"/></td> </tr> </xsl:for-each> </table> </xsl:for-each> </body> </html> </xsl:template> </xsl:stylesheet> This is the XML: <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="Orders.xsl"?> <orders xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Orders.xsd"> <order> <orderId>123</orderId> <items> <item> <itemId>001</itemId> <itemName>Nylon Rope</itemName> <quantity>1</quantity> <price>3.50</price> </item> <item> <itemId>002</itemId> <itemName>Shovel</itemName> <quantity>1</quantity> <price>24.95</price> </item> </items> <customerAddress> <customerName>Larry Murphy</customerName> <street>Shallowgrave Lane</street> <city>Ballymore Eustace, Co. Kildare</city> </customerAddress> </order> <order> <orderId>124</orderId> <items> <item> <itemId>001</itemId> <itemName>Whiskey</itemName> <quantity>1</quantity> <price>18.50</price> </item> <item> <itemId>002</itemId> <itemName>Shotgun</itemName> <quantity>1</quantity> <price>225</price> </item> <item> <itemId>003</itemId> <itemName>Cartridge</itemName> <quantity>1</quantity> <price>1.85</price> </item> </items> <customerAddress> <customerName>Enda Kenny</customerName> <street>A Avenue</street> <city>Castlebar, Co. Mayo</city> </customerAddress> </order> </orders>

    Read the article

  • Referencing an XML string in an XML Array (Android)

    - by jax
    in arrays.xml <string-array name="my_items"> <item>My item 1</item> <item>My item 2</item> <item>My item 3</item> </string-array> in strings.xml <resources> <string name="item1">My item 1</string> <string name="item2">My item 2</string> <string name="item3">My item 3</string> </resources> I would like to reference the string in the array "My item 1" from strings.xml. How do I do that?

    Read the article

  • How can I downgrade a system that accidentally had backports installed?

    - by Glyph
    I installed a fresh Ubuntu system. Somehow - possibly through my own error - the backports repository got enabled. Then I did several upgrades. I noticed that this happened when networking suddenly stopped working, "Network Settings" now has an "(alpha)" in the title bar, "System Settings" ? "Network" now displays an error dialog saying "The system network services are not compatible with this version". Now, I've disabled the backports repository, and I'd like to restore my system to its previously-functional state. My question is twofold: How do I determine which packages were installed from backports? Can I automatically re-install all those packages (and purge their configuration) to get back to a sensible state? If the answer to 2 is "no" I can probably manually purge some things and reinstall, but it would be nice to have it handled automatically. Update: It wasn't an update that broke the network; it was apt-get install indicator-network, which installed something called "connman" and removed network-manager and network-manager-gnome. Nevertheless I am leaving the question up, since I am still interested in how I can purge packages from a particular source after accidentally adding that source, and how I can determine which packages were installed from where.

    Read the article

  • XML transform element appearing in wrong place in document

    - by Mike
    I am having some problems with an XML transform and need some help. The stylesheet should iterate through all suffix elements and place the contents without the suffix tag next to the last text node within its first ancestor quote-block element (see desired ouput). It works when only a single suffix is present, but not when 2 are present, when 2 are present it places both suffixes next to each other in the last text node of the first quote-block. Any ideas? I have tried limiting the selections to ancestor::quote-block[1] in various places but that doesn't have the desired effect. Source XML <paragraph> <para> <quote-block> <list prefix-rules="specified"> <item prefix="“B42"> <para id="0a84d149-91b7-4012-ac6d-9f4eb8ed6c37">In June 2000, EME and EWS reached an agreement to negotiate towards a direct contract for coal haulage by rail (on a DIY basis), which would replace the previous indirect E2E arrangements that EME had in place with ECSL. An internal EWS e-mail noted: <quote-block> <quote-para>‘We did the deal with Edison Mission yesterday morning for LBT-Fiddlers @ £[…]/tonne as agreed. This rate until 16th September pending a contract.</quote-para> <quote-para><emphasis strength="strong">Enron are now off our hands so far as Edison are concerned. The Enron flows we have left are to British Energy’s station at Eggborough; from Immingham, Redcar and Hull</emphasis>. Also to Enron’s own power station at Wilton – 250,000 tonnes/year. I think we are stuck Enron [sic] on the Eggborough traffic until next April when British Energy will, hopefully take over their own coal procurement. <emphasis strength="strong">But we have got them out of Fiddlers Ferry and Ferrybridge – a big step forward</emphasis>.’</quote-para> <suffix>(Emphasis added.)</suffix> </quote-block> </para> </item> <item prefix="B43"> <para id="d64a5a72-0a02-476f-9a7b-7c07bbc93a8a">This e-mail is evidence of both EWS’s intent and, indeed, its success in stopping ECSL from carrying out indirect supplies to EME, one of the new generating companies.”</para> </item> </list> <suffix>(emphasis in original)</suffix> </quote-block> </para> </paragraph> Stylesheet <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://xml.sm.com/schema/cases/report" xmlns:sm="http://xml.sm.com/functions" xmlns:saxon="http://saxon.sf.net/" xpath-default-namespace="http://sm.com/schema/cases/report" exclude-result-prefixes="xs sm" version="2.0"> <xsl:output method="xml" indent="no"/> <xsl:template match="/"> <xsl:apply-templates/> </xsl:template> <xsl:template match="*"> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> <!-- Match quote-blocks with open or close attributes. --> <xsl:template match="*[*:quote-block and descendant::*:suffix]"> <xsl:call-template name="process-quote-block"/> </xsl:template> <!-- Match inline quote with open or close attributes --> <xsl:template match="*[*:quote and descendant::*:suffix]"> <xsl:call-template name="process-quote-block"/> </xsl:template> <!-- Process the quote block --> <xsl:template name="process-quote-block"> <xsl:variable name="quoteBlockCopy"> <xsl:copy-of select="."/> </xsl:variable> <xsl:apply-templates select="$quoteBlockCopy" mode="append-suffix"> <xsl:with-param name="suffix" select="sm:get-suffix-note(.)"/> <xsl:with-param name="end-node" select="sm:get-last-text-node($quoteBlockCopy)"/> </xsl:apply-templates> </xsl:template> <!-- Match quote-blocks with open or close attributes. --> <xsl:template match="*[*:quote-block and descendant::*:suffix][ancestor::*:quote-block[1]]" mode="create-copy"> <xsl:call-template name="process-quote-block"/> </xsl:template> <!-- Match inline quote with open or close attributes --> <xsl:template match="*[*:quote and descendant::*:suffix]" mode="create-copy"> <xsl:call-template name="process-quote-block"/> </xsl:template> <!-- This will match all elements. Just copy and pass through the parameters. --> <xsl:template match="*" mode="append-suffix"> <xsl:param name="suffix"/> <xsl:param name="end-node"/> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:apply-templates mode="append-suffix"> <xsl:with-param name="suffix" select="$suffix"/> <xsl:with-param name="end-node" select="$end-node"/> </xsl:apply-templates> </xsl:copy> </xsl:template> <!-- Apply the text node to the content. If the node is equal to the last node then append the descendants of suffix --> <xsl:template match="text()[normalize-space() != '']" mode="append-suffix"> <xsl:param name="suffix"/> <xsl:param name="end-node"/> <xsl:choose> <xsl:when test="count(. | $end-node) = 1"> <xsl:value-of select="."/> <xsl:apply-templates select="$suffix"/> </xsl:when> <xsl:otherwise> <!-- Or maybe neither. --> <xsl:value-of select="."/> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- Dont copy suffix as --> <xsl:template match="*:suffix" mode="append-suffix"/> <xsl:function name="sm:get-suffix-note"> <xsl:param name="node"/> <xsl:sequence select="$node/descendant::*:suffix/node()"/> </xsl:function> <xsl:function name="sm:get-last-text-node"> <!-- Finds last non-empty text() node, ignoring <suffix> elements that are a child of this specific quote-block. --> <xsl:param name="node"/> <xsl:sequence select="reverse($node//text()[not(ancestor::*:suffix) and normalize-space() != ''])[1]"/> </xsl:function> </xsl:stylesheet> Current Output XML <paragraph> <para> <quote-block> <list prefix-rules="specified"> <item prefix="“B42"> <para id="0a84d149-91b7-4012-ac6d-9f4eb8ed6c37">In June 2000, EME and EWS reached an agreement to negotiate towards a direct contract for coal haulage by rail (on a DIY basis), which would replace the previous indirect E2E arrangements that EME had in place with ECSL. An internal EWS e-mail noted: <quote-block> <quote-para>‘We did the deal with Edison Mission yesterday morning for LBT-Fiddlers @ £[…]/tonne as agreed. This rate until 16th September pending a contract.</quote-para> <quote-para><emphasis strength="strong">Enron are now off our hands so far as Edison are concerned. The Enron flows we have left are to British Energy’s station at Eggborough; from Immingham, Redcar and Hull</emphasis>. Also to Enron’s own power station at Wilton – 250,000 tonnes/year. I think we are stuck Enron [sic] on the Eggborough traffic until next April when British Energy will, hopefully take over their own coal procurement. <emphasis strength="strong">But we have got them out of Fiddlers Ferry and Ferrybridge – a big step forward</emphasis>.’</quote-para> </quote-block> </para> </item> <item prefix="B43"> <para id="d64a5a72-0a02-476f-9a7b-7c07bbc93a8a">This e-mail is evidence of both EWS’s intent and, indeed, its success in stopping ECSL from carrying out indirect supplies to EME, one of the new generating companies.”(Emphasis added.)(emphasis in original)</para> </item> </list> </quote-block> </para> </paragraph> Desired Ouput <paragraph> <para> <quote-block> <list prefix-rules="specified"> <item prefix="“B42"> <para id="0a84d149-91b7-4012-ac6d-9f4eb8ed6c37">In June 2000, EME and EWS reached an agreement to negotiate towards a direct contract for coal haulage by rail (on a DIY basis), which would replace the previous indirect E2E arrangements that EME had in place with ECSL. An internal EWS e-mail noted: <quote-block> <quote-para>‘We did the deal with Edison Mission yesterday morning for LBT-Fiddlers @ £[…]/tonne as agreed. This rate until 16th September pending a contract.</quote-para> <quote-para><emphasis strength="strong">Enron are now off our hands so far as Edison are concerned. The Enron flows we have left are to British Energy’s station at Eggborough; from Immingham, Redcar and Hull</emphasis>. Also to Enron’s own power station at Wilton – 250,000 tonnes/year. I think we are stuck Enron [sic] on the Eggborough traffic until next April when British Energy will, hopefully take over their own coal procurement. <emphasis strength="strong">But we have got them out of Fiddlers Ferry and Ferrybridge – a big step forward</emphasis>.’(Emphasis added.)</quote-para> </quote-block> </para> </item> <item prefix="B43"> <para id="d64a5a72-0a02-476f-9a7b-7c07bbc93a8a">This e-mail is evidence of both EWS’s intent and, indeed, its success in stopping ECSL from carrying out indirect supplies to EME, one of the new generating companies.”(emphasis in original)</para> </item> </list> </quote-block> </para> </paragraph>

    Read the article

  • Crossbrowser XmlDsig

    - by m0sa
    I am building a web site where the user has to digitally sign a xml reciept to confirm that he recieved the package. I am currently doing this using a custom ActiveX control in IE. I was wondering if I could accomplish the same thing with/for other browsers. Is it even possible?

    Read the article

  • Xsd recursion of complexTypes

    - by Hatch
    I am just learning XML/XSD and am struggling with the implementation of an XML-schema which models a folder structure. What I had in mind was defining a complexType for the folder which can have additional folder instances that represent subfolders. Using the xsd schema validator here always returns that the schema is invalid. I tried defining the complexType up front and then using the ref keyword for subfolders: <xs:complexType name="tFolder"> <xs:sequence> <xs:element name="Path" type="tFolderType" msdata:Ordinal="0" /> <xs:element ref="Folder" minOccurs="0" maxOccurs="unbounded" /> <xs:element name="File" nillable="true" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:simpleContent msdata:ColumnName="File_Text" msdata:Ordinal="0"> <xs:extension base="xs:string"> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="Type" type="tFolderType" /> As for the element itself: <xs:element name="Folder" type="tFolder" /> The error returned by the validator is: "Cannot resolve the name 'Folder' to a(n) 'element declaration' component." and the error occurs at the line <xs:element ref="Folder" minOccurs="0" maxOccurs="unbounded" /\> Defining the complexType within the element itself yields the exact same error: <xs:element name="Folder"> <xs:complexType> <xs:sequence> <xs:element name="Path" type="tFolderType" msdata:Ordinal="0" /> <xs:element ref="Folder" minOccurs="0" maxOccurs="unbounded" /> <xs:element name="File" nillable="true" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:simpleContent msdata:ColumnName="File_Text" msdata:Ordinal="0"> <xs:extension base="xs:string"> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="Type" type="tFolderType" /> </xs:complexType> </xs:element> What I've read, this kind of recursion should work using ref. Can anyone tell me what I've done wrong? Maybe the xsd validator is just faulty? If so, does anyone know a better alternative? I've tried using the one from w3.org as well, but it seems to be taken offline...

    Read the article

  • XSD: xs:sequence & xs:choice combination for xs:extension elements?

    - by bguiz
    Hi, My question is about defining an XML schema that will validate the following sample XML: <rules> <other>...</other> <bool>...</bool> <other>...</other> <string>...</string> <other>...</other> </rules> The order of the child nodes does not matter. The cardinality of the child nodes is 0..unbounded. All the child elements of the rules node have a common base type, rule, like so: <xs:complexType name="booleanRule"> <xs:complexContent> <xs:extension base="rule"> ... </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name="stringFilterRule"> <xs:complexContent> <xs:extension base="filterRule"> ... </xs:extension> </xs:complexContent> </xs:complexType> My current attempt at defining the schema for the rules node is below. However, Can I nest xs:choice within xs:sequence? If, where do I specify the maxOccurs="unbounded" attribute? Is there a better way to do this, such as an xs:sequence which specifies only the base type of its child elements? <xs:element name="rules"> <xs:complexType> <xs:sequence> <xs:choice> <xs:element name="bool" type="booleanRule" /> <xs:element name="string" type="stringRule" /> <xs:element name="other" type="someOtherRule" /> </xs:choice> </xs:sequence> </xs:complexType> </xs:element>

    Read the article

  • How can I create XSD files from M documents?

    - by Andrew Matthews
    Does anyone know of a nice way to: produce XSD documents from an OSLO model consume conformant XML documents using that model and add directly into the DB created from the model? I can't see any obvious way from the current documentation, but I'm a newcomer, so I may have missed something. Thanks.

    Read the article

  • Eclipse wont open Android Xml files

    - by mike
    I'm just starting with Android and everything seems to be working fine, but when I try to look at any XML file in eclipse, I get the following error. The only way I can see them is by "Opening With" - TextFile. org.eclipse.core.runtime.CoreException: Error opening the Android XML editor. Is the document an XML file? at com.android.ide.eclipse.adt.internal.editors.AndroidEditor.createTextEditor(Unknown Source) at com.android.ide.eclipse.adt.internal.editors.AndroidEditor.createAndroidPages(Unknown Source) at com.android.ide.eclipse.adt.internal.editors.AndroidEditor.addPages(Unknown Source) at org.eclipse.ui.forms.editor.FormEditor.createPages(FormEditor.java:138) at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:357) at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:662) at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:462) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595) at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:286) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2857) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2762) at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2754) at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2705) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2701) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2685) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2676) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:361) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:168) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:229) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:208) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:373) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:526) at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48) at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:842) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.runtime.Platform.run(Platform.java:888) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:840) at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1101) at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1205) at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:264) at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:258) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:298) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    Read the article

  • Example WCF XML-RPC client C# code against custom XML-RPC server implementation?

    - by mr.b
    I have built my own little custom XML-RPC server, and since I'd like to keep things simple, on both server and client side (server side PHP runs, by the way), what I would like to accomplish is to create a simplest possible client in C# using WCF. Let's say that Contract for service exposed via XML-RPC is as follows. [ServiceContract] public interface IContract { [OperationContract(Action="Ping")] string Ping(); // server returns back string "Pong" [OperationContract(Action="Echo")] string Echo(string message); // server echoes back whatever message is } So, there are two example methods, one without any arguments, and another with simple string argument, both returning strings (just for sake of example). Service is exposed via http. What's next? Thanks for reading! P.S. I have done my homework of googling around for samples and similar, but all that I could come up with are some blog-related samples that use existing (and very big) classes, which implement correct IContract (or IBlogger) interfaces, so that most of what I am interested is hidden below several layers of abstraction...

    Read the article

  • Display custom title bar for Android with XML

    - by Casebash
    In Android documentation describing "Configuring General Window Properties", it is suggested that specifying properties via XML is preferable whenever possible to avoid seeing the title bar flash. As an example, instead of setting Window.FEATURE_NO_TITLE with requestWindowFeature, they set it to @android:style/Theme.NoTitleBar. Is there a similar way to set a custom title bar to be used in the XML? Update: I just found this article, according to which this article, the best way to draw a title bar is to ignore FEATURE_CUSTOM_TITLE and instead just draw the title bar as part of your main view. This would not only avoid the flashing, but also problems caused by padding.

    Read the article

  • Map external directory to web.xml

    - by prometheus
    Is there an easy way to map a directory in the web.xml or other deployment descriptor (jetty.xml, etc) files? For example, if I have a directory /opt/files/ is there a way that I can access its files and sub-directories by visiting http://localhost/some-mapping/? It strikes me that there should be some simple way of doing this, but I haven't been able to find out how (via google, stackoverflow, etc). All I've found are servlets that mimic fileservers, which is not what I would like. For reference I am using jetty on an AIX box.

    Read the article

  • How to use EMF to read XML file?

    - by zengr
    I have to use EMF in one of my class projects. I am trying to understand how to use EMF to do the following: Read XML, Get the values into objects. Use ORM to persist the values in objects to database. - Done Get data from database using ORM and generate XML. I need to do all of that using: EMF (no idea what so ever) and JPA (DONE). I have used JAXB and I know, this can be done using JAXB, but how is (EMF == JAXB)?! I have created many java classes using EMF, but there are so many of them! Where do I implement the read/write methods and how do I run the EMF project? Thanks

    Read the article

  • Cocoon lite / XML and XSLT publishing framework

    - by bambax
    What publishing frameworks (publishing only, NOT full-blown CMS) based on XML, XSLT sitemaps and pipelines exist, are stable, active, and simpler / lighter than Cocoon? I have glanced at: mod_xslt (http://www.mod-xslt2.com/) which seemed to be exactly that, but looks all but dead, and required a complex setup, and apparently supported only libxslt as an XSLT processor (I'd like to be able to use Saxon and XSLT 2.0 of course). Apache Forrest (http://forrest.apache.org/), but I don't understand if it is really simpler than Cocoon or is rather an additionnal thing on top of Cocoon? What I'm looking for is something that does just this: recieves an HTTP GET "runs it" through a sitemap finds a pipeline: source.xml - xslt1.xsl - xslt2.xsl - xsltn.xsl - serialize runs the pipeline serves the serialized result to the client and: uses Saxon (or is "processor independant") can be installed "lightly", that is: should not require much more configuration than the sitemap Maybe I'm describing an early version of Cocoon, or a future version of an XProc implementation... Anyway, does such a tool exist?

    Read the article

< Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >