Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

XSL, ASP, Dynamic XML

Explorer ,
Jun 26, 2008 Jun 26, 2008
Hi there:

I have created an XSLT fragment that is inserted on a working ASP page. When I use a static XML file, generated by an ASP script and saved to the server, the conversion and XML loading works fine. See the link below.

[ Uses static XML file ]
https://www.pettusop.com/eserv/dev/catalog_test.staticxml.asp?pcid=754

I run into trouble when I try to use this same "page" with a dynamically generated XML file. If I use a local ASP filename, I get an error that is apparently due to the fact that the ASP does not get parsed/run when called by the MM_XSLTransform class.

[ Local dynamic XML via ASP ]
https://www.pettusop.com/eserv/dev/catalog_test.localasp.asp?pcid=754

I thought I could get around this by hitting a URL, but that generates an error too. Something about whitespace. The XML that is generated is just fine.

[ Dynamic XML via ASP through URL ]
https://www.pettusop.com/eserv/dev/catalog_test.url.asp?pcid=754

I found this (link below) old post about a similar problem, but I'm not sure how to modify the MM_XSLTransform class or if I just need to "tweak" what I'm doing a bit.
http://www.stylusstudio.com/xmldev/200111/post60920.html

Any suggestions?

Thank you,
James
TOPICS
Server side applications
433
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 26, 2008 Jun 26, 2008
> I run into trouble when I try to use this same "page" with a dynamically
> generated XML file. If I use a local ASP filename, I get an error that is
> apparently due to the fact that the ASP does not get parsed/run when
> called by
> the MM_XSLTransform class.

"https://www.pettusop.com/eserv/TW_assets/TW_catalog/xml/catalog_items.asp"
is not a valid XML document.
reason: Required white space was missing.

That seems to be a rather vague error from the googling I've done.

Can you compare the dynamic XML file to the static one? Are there some
subtle changes between the two?

-Darrel


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 26, 2008 Jun 26, 2008
Thank you for your reply.

quote:

Can you compare the dynamic XML file to the static one?


There were no differences when I run the XML generating script directly, but I can't quite tell what the MM class was receiving. I was able to manually connect using some informaiton I found at http://authors.aspalliance.com/aaron/XMLpost.aspx. When I ran the script, I saw that the server-side processing made via the request could not access information in the session. In my case, that was prohibitive.

I "resolved" the situation by creating cache xml files. The script looks for an existing xml file for the category id. If one is found, it is used. If one is not found, it is created. They will be deleted routinely.

You can see the end result using the catalog. Only the "lowest level" of the catalog is run via XSL. It was needed because the price is determined post-database, and a requirement was to include price sorting.
https://www.pettusop.com/eserv/dev/SH_Catalog.asp?pcid=642

It would be nice to make the call directly to the ASP code and create the XML on the fly, if anyone has any direction or ideas.

I'll have to see how the file generation scales.

Best regards,
James
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 30, 2008 Jun 30, 2008
Writing xml files on the fly, instead of consuming dynamic xml directly has really become clumsy.

Does anyone know how to use the DW XSLT tools to connect with a dynamically generated xml file? I have not been able to get that to work. The ASP file that generates the xml must be parsed/run.

Alternatively, does anyone know of an ASP class or code snipped that will allow me to do this (without using DW's built-in tools)?

Thanks again!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 30, 2008 Jun 30, 2008
> Alternatively, does anyone know of an ASP class or code snipped that will
> allow me to do this (without using DW's built-in tools)?

If you're willing to migrate to ASP.net, and away from DW, there are some
nice classes in ASP.net that deal with XML nicely. But, alas, that is a bit
of a departure from ASP + DW, admittedly.

-Darrel


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 30, 2008 Jun 30, 2008
LATEST
there is an extension by name Recordset to xml for all the server model. i hope that might help you
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines