SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Resident OCD goofball! bronze trophy Serenarules's Avatar
    Join Date
    Dec 2002
    Posts
    1,911
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)

    Quickly answered question I hope...

    In the following XML snippet from the zend examples pages...

    <?xml version="1.0"?>
    <entries xmlns:blog="http://www.edwardbear.org/serendipity/">
    <blog:entry>
    <blog:name>RPROF Regular Expression Profiler</blog:name>
    </blog:entry>
    <blog:entry>
    <blog:name>Advanced PHP Programming</blog:name>
    </blog:entry>
    </entries>


    What is the XML parser looking for at the url in red above? My hunch would be blog.dtd, but my experience with XML is relatively nil, in a direct sense.

  2. #2
    SitePoint Guru worchyld's Avatar
    Join Date
    Jul 2003
    Location
    Newcastle upon Tyne
    Posts
    909
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It doesn't look like its referencing any .dtd file in the red bit...

    Its a link, isn't it?

  3. #3
    Resident OCD goofball! bronze trophy Serenarules's Avatar
    Join Date
    Dec 2002
    Posts
    1,911
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    It's an url, or uri rather. All the examples I've seen are setup like this. I want to know what the importance of the url is. Example, why I can't I just make an url up? I need to know what XML is using the url for exactly.

  4. #4
    SitePoint Member
    Join Date
    Jan 2005
    Location
    NC
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The red text is just the URI of the namespace you created...namespaces can be pretty confusing (they are to me) but it's a way to distinguish multiple elements or functions within an xml or group of xml's. You could just make up a namespace in your case and it probably wouldn't affect your tranformation. Validation is a completely different animal- for that you would provide the URI of a schema or dtd in a different attribute.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •