Jump to content

MrAdam

Members
  • Content Count

    489
  • Joined

  • Last visited

Community Reputation

0 Neutral

About MrAdam

  • Rank
    Member
  • Birthday 07/24/1989

Contact Methods

  • Website URL
    http://
  • ICQ
    0
  1. Hi,I was wondering if anybody knew of any PHP frameworks, specially suited for re-distributable applications? Modern frameworks are very good for splitting the different layers of an application, but they don't strike me as very distributable. I want a good structure and feel to the framework, without quite so much of the bloat and no special requirements to get it running. My application isn't huge, so doesn't need complex routing or multi-application capabilities, etc. Anybody have any to recommend?ThanksAdam
  2. No problem, thanks anyway. I've looked at several different frameworks and they all have their own approach to models, but none seem to be what I'm after. I'll keep digging!
  3. That makes sense, thanks.One other question.. Where would you think is the right place in a typical MVC-based framework to store such objects? For example the project I have in mind at the moment, certain parts of it (employees, clients, etc.) I want to create an Employee, or Client, etc. object to represent them. Obviously straight-forward OO, but where would that make sense in an MVC-based framework?Thanks for your help.Adam
  4. Thanks for your reply.I did think of autoloading the class, but due to the structure of the files I can't see any easy way to do that other than to have it check two directories. Would you say that's acceptable for autoloading? I want it to be as quick and snappy as possible, while keeping a very organised structure. I have the traditional "controller/", "model/" and "view/" directories. Only the "model/" is necessary for autoloading, as the controllers and views are resolved in a different manor.The second directory mentioned is a library of classes that contains the core components of the fr
  5. Hey up everyone,I'm designing my own MVC-based framework. I'm not trying to re-invent the wheel or anything, I just want a simple, custom platform I can build my projects on. I'm implementing some objects (for example User) and creating a factory class (for example UserFactory) that handles constructing the object in various ways. There's an abstract base Factory class that each factory would extend to provide some generic functionality.I'm a little unsure how to structure the factory classes though. Would you say that it's acceptable to have both the User class and UserFactory class within th
  6. Realised a few obvious flaws with the previous XSD. Changed it to: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="products"> <xs:sequence> <xs:element name="product"> <xs:sequence> <xs:complexType> <xs:element name="title" type="xs:string" /> </xs:complexType> </xs:sequence> </xs:element> </xs:sequence> </xs:element></xs:schema> But get the error:
  7. I decided to take things back to basics.With this XML: <?xml version="1.0"?><products> <product> <title>Product A</title> </product></products> And this XSD: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="products"> <xs:complexType> <xs:element name="title" type="xs:string" /> </xs:complexType> </xs:element></xs:schema> I receive the following error: Referring to this line: <xs:element name="title" type="xs:string" /> I feel like I'm missing something fundamental o
  8. Sorry I posted a little prematurely there. I have managed to fix some of the issues, but I still get one: lement '{http://www.w3.org/2001/XMLSchema}complexType': The content is not valid. Expected is (annotation?, (simpleContent | complexContent | ((group | all | choice | sequence)?, ((attribute | attributeGroup)*, anyAttribute?)))) That's using PHP's DOM schema validator. I used an on-line validator and the error is: 4s-elt-invalid-content.1: The content of '#AnonType_products' is invalid. Element 'element' is invalid, misplaced, or occurs too often. Which refers to the line: <xs:e
  9. Hi guys,Managed to get some-what comfortable with XSLT now, but looking to validate my XML against my schema. I'm working with the following, pretty-simple XML: <products> <product id="1"> <title>Product A</title> <stock> <available>123</available> <ordered>123</ordered> <delivery>01/01/1970</delivery> </stock> <stats> <total_sold>123</total_sold> <per_order_average>123.45</per_order_average> <all_order_average>123.45</all_order_average> </stats> </produc
  10. Thanks for your response. I'm using PHP's XSLTProcessor class. I solved the issue by using the unicode " " white-space character.Thanks again for your help.
  11. Sorted, cheers. I switched it to "xml" and omitted the opening XML tag. I just have one more question though...I have some XHTML like: <h3><span>#1</span> Product Title</h3> Where "1" and "Product Title" are replaced by the XML value. That's all fine, but when it's processed the space between the closing span tag and the start of the title text is stripped out. So the result looks like: I came across the "xml:space" attribute:<h3 xml:space="preserve"> This works works visually, but oddly it's still shown within the source afterwards..?Thanks for all your help
  12. Hey up again,Quite comfortable with XSLT now, but have a puzzling problem. In my <xsl:output ... /> tag, I'm specifying the 'doctype-public' and 'doctype-system' attributes as the correct values for XHTML Strict 1.0: <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" /> However when I view the source code of the web page, the mark-up is HTML with an XHTML DOCTYPE? Also nothing is indented, like I'd expect to see with indent="yes"?Any help
  13. Once again steered me right! Cheers for that.
  14. Hey up,Is it possible to kind of modularise XSLT templates, by including other external templates into them? I tried to look for something like this on Google but couldn't find anything...Thanks
  15. Brilliant, thank you. I'm actually really enjoying learning it. It's been something I've meant to try for a long time, and now I'm glad I did.Thanks again.
×
×
  • Create New...