beginner guide

Discussion in 'XML' started by mick, Oct 21, 2008.

  1. mick

    mick Guest

    hello,
    I need to learn enough xml to use a piece of software. can anybody
    point me to a friendly guide. right now I want to know exactly what a
    placeholder is. I kind of understand but not really .

    thanks

    mick
    mick, Oct 21, 2008
    #1
    1. Advertising

  2. mick

    Peter Flynn Guest

    mick wrote:
    > hello,
    > I need to learn enough xml to use a piece of software. can anybody
    > point me to a friendly guide. right now I want to know exactly what a
    > placeholder is. I kind of understand but not really .


    The term placeholder isn't specific to XML: it's used in a lot of
    computing and non-computing fields.

    You haven't told us what the piece of software is that you want to use,
    but in most document contexts I have come across, "placeholder" means an
    empty element or attribute (or one with a temporary value) which must be
    present to satisfy the constraints of the Schema or DTD, but which does
    not yet have any real value or content.

    For example, in DocBook, a chapter must have a title and at least one
    other element present for the document to be valid, so you might want to
    create dummy entries for your intended chapters, but with no content, eg

    <chapter id="xyz">
    <title></title>
    <para></para>
    </chapter>

    (although it would be more likely that you would give the titles: that
    would at least enable you to generate the Table of Contents). In this
    sense, the para element is a placeholder, so is the ID value.

    ///Peter
    Peter Flynn, Oct 21, 2008
    #2
    1. Advertising

  3. mick

    mick Guest

    On 21 Oct, 22:23, Peter Flynn <> wrote:
    > mick wrote:
    > > hello,
    > > I need to learn enough xml to use a piece of software. can anybody
    > > point me to a friendly guide. right now I want to know exactly what a
    > > placeholder is. I kind of understand but not really .

    >
    > The term placeholder isn't specific to XML: it's used in a lot of
    > computing and non-computing fields.
    >
    > You haven't told us what the piece of software is that you want to use,


    http://groups.google.co.uk/group/krpano/browse_thread/thread/cf3ad38936eb97f7?hl=en

    Those guys will answer eventually I'm sure but I need to get on.

    regards

    mick
    mick, Oct 22, 2008
    #3
  4. mick

    Peter Flynn Guest

    mick wrote:
    > On 21 Oct, 22:23, Peter Flynn <> wrote:
    >> mick wrote:
    >>> hello,
    >>> I need to learn enough xml to use a piece of software. can anybody
    >>> point me to a friendly guide. right now I want to know exactly what a
    >>> placeholder is. I kind of understand but not really .

    >> The term placeholder isn't specific to XML: it's used in a lot of
    >> computing and non-computing fields.
    >>
    >> You haven't told us what the piece of software is that you want to use,

    >
    > http://groups.google.co.uk/group/krpano/browse_thread/thread/cf3ad38936eb97f7?hl=en
    >
    > Those guys will answer eventually I'm sure but I need to get on.


    To answer your first question there, the two documents:

    <image type="SPHERE"
    tiled="true"
    tiledimagewidth="8192"
    tiledimageheight="4096"
    tilesize="1024"
    >

    <sphere url="sphere_tiles_%v_%u.jpg" />
    </image>

    and

    <image>
    <type>SPHERE</type>
    <tiled>true</tiled>
    <tiledimagewidth>8192</tiledimagewidth>
    <tiledimageheight>4096</tiledimageheight>
    <tilesize>1024</tilesize>
    <sphere>
    <url>sphere_tiles_%v_%u.jpg</url>
    </sphere>
    </image>

    are equivalent but not "the same". That is, they describe the
    information with the same names, but using a different syntax.

    See the XML FAQ at http://xml.silmaril.ie/developers/attributes/ for
    more on using attributes vs elements. My own rule is that numerical and
    categorical data is best held in attributes, while normal text is best
    held in elements, so I would prefer the first method for this data; but
    there are probably many people who will disagree.

    But you say that the Krpano docs say (on the first page of docs) "use
    proper xml syntax". That's a different question. They must first tell
    you what they mean by "proper".

    XML can be used (and abused) for almost anything. The only sensible
    meaning for "proper" here is "well-formed"; the rules for this are in
    the XML Spec and are summarised in the XML FAQ at
    http://xml.silmaril.ie/developers/validity/#wf

    However, abuse of terminology is also rife, so Krpano may mean "XML
    valid according to our Schema or DTD", which is one step further than
    well-formedness. Valid documents are not only well-formed; they must
    adhere to the specified structure and naming set out in a particular
    Schema or DTD.

    It is very rare that you are allowed just to make up your own XML and
    expect some random application automagically to know what it means, so
    you should check with the Krpano people as to what the "proper" XML is.
    It appears from the thread you quote that there is already some
    specified set of names (image, sphere, etc) that you are aware of, so
    you presumably already know what you must use.

    ///Peter
    Peter Flynn, Oct 23, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ben Finney

    Best Beginner's Guide To Python?

    Ben Finney, Feb 6, 2004, in forum: Python
    Replies:
    12
    Views:
    702
    Dang Griffith
    Feb 6, 2004
  2. jacob navia

    Re: Beginner's guide to MinGW?

    jacob navia, Mar 9, 2010, in forum: C Programming
    Replies:
    37
    Views:
    893
  3. Rod Pemberton

    Re: Beginner's guide to MinGW?

    Rod Pemberton, Mar 13, 2010, in forum: C Programming
    Replies:
    0
    Views:
    1,157
    Rod Pemberton
    Mar 13, 2010
  4. Robert
    Replies:
    0
    Views:
    218
    Robert
    May 21, 2011
  5. Steve Hayes

    Beginner's guide to Python

    Steve Hayes, Sep 4, 2013, in forum: Python
    Replies:
    7
    Views:
    93
    Steven D'Aprano
    Sep 5, 2013
Loading...

Share This Page