Search Results

Search found 53 results on 3 pages for 'toto'.

Page 3/3 | < Previous Page | 1 2 3 

  • Firefox not running jQuery for XHTML output

    - by ScottSEA
    Okay, I did a crappy job of describing the issue in my previous post. I think the discussion got sidetracked from the core issue - so I'm going to try again. Mea Culpa to Elzo Valugi about the aforementioned thread. I have an XML file: <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="wtf.xsl"?> <Paragraphs> <Paragraph>Hi</Paragraph> </Paragraphs> Simple enough. I also have a stylesheet to create XHTML output: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" indent="yes" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" omit-xml-declaration="yes"/> <xsl:template match="/*"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>FF-JS-XHTML WTF</title> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="wtf.js"></script> </head> <body> <xsl:apply-templates /> </body> </html> </xsl:template> <xsl:template match="Paragraph"> <p> <xsl:apply-templates /> </p> </xsl:template> </xsl:stylesheet> Last but not least, I have the following jQuery in toto (wtf.js, from the script tag in the stylesheet): $(function() { alert('Hiya!'); $('<p>Hello</p>').appendTo('body'); }); Extremely simple, but sufficient for the demonstration. When I run this in Internet Explorer, I get the alert 'Hiya!' as well as the expected: Hi Hello but when I run it in Firefox (3.0.1), I still get the alert, but the jQuery does not insert the paragraph into the DOM, and I just get this: Hi If I change the stylesheet to method="html" it works fine, and I get (along with the alert): Hi Hello Why doesn't Firefox run the jQuery with an XHTML document? Has anyone any experience with this problem? EDIT: ADDITIONAL INFO I can successfully insert elements into the documents this way in Firefox (method="xml"): var frag = document.createDocumentFragment(); var p = document.createElement('p'); p.appendChild(document.createTextNode('Ipsum Lorem')); frag.appendChild(p); $('body').append(frag); but I'm running into a similar problem with the .remove() method. It is looking more and more that Firefox doesn't construct a DOM from XML that jQuery can relate to, or somesuch.

    Read the article

  • Problem designing xsd schema - because of a variable element name

    - by ssaboum
    Hi everyone, i'm not the best at creating XSD schema as this is actually my first one, i would like to validate an xml that must look like this : <?xml version="1.0"?> <Data> <FIELD name='toto'> <META mono='false' dynamic='false'> <COLUMN1> <REFTABLE>table</REFTABLE> <REFCOLUMN>key_column</REFCOLUMN> <REFLABELCOLUMN>test_column</REFLABELCOLUMN> </COLUMN1> <COLUMN2> <REFTABLE>table</REFTABLE> <REFCOLUMN>key_column</REFCOLUMN> <REFLABELCOLUMN>test_column</REFLABELCOLUMN> </COLUMN2> </META> <VALUEs> <VALUE>...</VALUE> </VALUEs> </FIELD> My problem is that into the META block the tags "COLUMN1","COLUMN2" are always different, it may become COLUMNxxx. For now my schema is : <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="Data"> <xsd:complexType> <xsd:sequence> <xsd:element name="FIELD" type="Field" /> </xsd:sequence> <xsd:attribute name="id" type="xsd:int" use="required" /> </xsd:complexType> </xsd:element> <xsd:complexType name="dataSourceDef"> <xsd:sequence> <xsd:element name="DSD_REFTABLE" type="xsd:string" /> <xsd:element name="DSD_REFCOLUMN" type="xsd:string" /> <xsd:element name="DSD_REFLABELCOLUMN" type="xsd:string" /> </xsd:sequence> </xsd:complexType> <xsd:complexType name="MetaTag"> <xsd:sequence> <xsd:any processContents="lax" /> </xsd:sequence> <xsd:attribute name="mono" type="xsd:string" use="required" /> <xsd:attribute name="dynamic" type="xsd:string" use="required"/> </xsd:complexType> <xsd:complexType name="Field"> <xsd:sequence> <xsd:element name="META" type="MetaTag" minOccurs="1" /> <xsd:element name="VALUEs"> <xsd:complexType> <xsd:sequence> <xsd:any processContents="lax" /> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required"/> </xsd:complexType> </xsd:schema> And i just can't get it to work, i don't know how to handle the fact that a precise level of my nodes isn't clear, and the rest is. Would you help me please ? thx

    Read the article

  • Suggestions on how to map from Domain (ORM) objects to Data Transfer Objects (DTO)

    - by FryHard
    The current system that I am working on makes use of Castle Activerecord to provide ORM (Object Relational Mapping) between the Domain objects and the database. This is all well and good and at most times actually works well! The problem comes about with Castle Activerecords support for asynchronous execution, well, more specifically the SessionScope that manages the session that objects belong to. Long story short, bad stuff happens! We are therefore looking for a way to easily convert (think automagically) from the Domain objects (who know that a DB exists and care) to the DTO object (who know nothing about the DB and care not for sessions, mapping attributes or all thing ORM). Does anyone have suggestions on doing this. For the start I am looking for a basic One to One mapping of object. Domain object Person will be mapped to say PersonDTO. I do not want to do this manually since it is a waste. Obviously reflection comes to mind, but I am hoping with some of the better IT knowledge floating around this site that "cooler" will be suggested. Oh, I am working in C#, the ORM objects as said before a mapped with Castle ActiveRecord. Example code: By @ajmastrean's request I have linked to an example that I have (badly) mocked together. The example has a capture form, capture form controller, domain objects, activerecord repository and an async helper. It is slightly big (3MB) because I included the ActiveRecored dll's needed to get it running. You will need to create a database called ActiveRecordAsync on your local machine or just change the .config file. Basic details of example: The Capture Form The capture form has a reference to the contoller private CompanyCaptureController MyController { get; set; } On initialise of the form it calls MyController.Load() private void InitForm () { MyController = new CompanyCaptureController(this); MyController.Load(); } This will return back to a method called LoadComplete() public void LoadCompleted (Company loadCompany) { _context.Post(delegate { CurrentItem = loadCompany; bindingSource.DataSource = CurrentItem; bindingSource.ResetCurrentItem(); //TOTO: This line will thow the exception since the session scope used to fetch loadCompany is now gone. grdEmployees.DataSource = loadCompany.Employees; }, null); } } this is where the "bad stuff" occurs, since we are using the child list of Company that is set as Lazy load. The Controller The controller has a Load method that was called from the form, it then calls the Asyc helper to asynchronously call the LoadCompany method and then return to the Capture form's LoadComplete method. public void Load () { new AsyncListLoad<Company>().BeginLoad(LoadCompany, Form.LoadCompleted); } The LoadCompany() method simply makes use of the Repository to find a know company. public Company LoadCompany() { return ActiveRecordRepository<Company>.Find(Setup.company.Identifier); } The rest of the example is rather generic, it has two domain classes which inherit from a base class, a setup file to instert some data and the repository to provide the ActiveRecordMediator abilities.

    Read the article

< Previous Page | 1 2 3