Results 1 to 5 of 5

Thread: XML Question

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2002
    Posts
    159

    XML Question

    --Post removed--
    Last edited by NOTSOSURE; Dec 6th, 2005 at 02:45 PM.

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: XML Question

    That looks rather hard to transform.

    In products.xml, I'd remove the page element. Instead, give the product element two attributes: @type can be any of "component", "peripheral", etc. @subtype would then denote the various subsections.

    In structure.xml, there should be multiple section elements, with a @type attribute matching that of products.xml. Remove the <COMPONENT> etc. elements; they should be replaced by these section elements. The subsection element would be easier to handle if what is now the content was a @subtype attribute. (In general, I find attributes a lot easier to handle in XSLT, but that's your choice.)

    I haven't done anything with XSLT 2 so far, so I can't help you with the multiple document stuff.
    I wonder, though: what transformer are you using?
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: XML Question

    No, attributes, not elements.
    <product type="component" subtype="memory">
    ...
    </product>
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: XML Question

    No. You change the product tag you already have, not add another one. Why are you using all uppercase anyway? It's rather annoying to type.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: XML Question

    Yes.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

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



Click Here to Expand Forum to Full Width