Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by mpjbrennan
    I think the XSLT standard is flawed in one major aspect - it relies upon a processing instruction to be embedded in the XML document which is being transformed

    I'd agree if that were the only way ... but there's lots of ways to link an XML doc and XSL stylesheet together - javascript, php, asp ...

    And I believe (I read this superficially but haven't tried it yet) there's an XPointer method for symbolically linking two XML documents together, which can be used in a way such that a stylesheet effectively imports an XML doc to process, so the link reference is inside the stylesheet instead of the XML.
    Last edited by brothercake; 01-19-2003 at 05:42 PM.

  2. #17
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Originally posted by brothercake
    And I believe (I read this superficially but haven't tried it yet) there's an XPointer method for symbolically linking two XML documents together, which can be used in a way such that a stylesheet effectively imports an XML doc to process, so the link reference is inside the stylesheet instead of the XML.
    You can use the document() XSLT XPath function to load a remote XML document, and then execute XPath matches against it. You can use that as a slight hack by dynamically generating essentially an empty XML document with a processing instruction pointing to the "stand-alone" XSLT document.

    I've done something similar before, but not quite that.

  3. #18
    Regular Coder
    Join Date
    Jun 2002
    Location
    Newcastle, England
    Posts
    178
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes, but wouldn't it be so much better if you could simply write something like:

    <?xml-doc href="some_file.xml"?>

    in your stylesheet

    patrick

  4. #19
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Originally posted by mpjbrennan
    Yes, but wouldn't it be so much better if you could simply write something like:

    <?xml-doc href="some_file.xml"?>

    in your stylesheet

    patrick
    Yes, I agree fully.... perhaps you might want to suggest this to the XSLT mailing list at w3.org?


 
Page 2 of 2 FirstFirst 12

Posting Permissions

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