• 0

XSL reading URL parameters


Question

I have an ASP.NET page (news.aspx), which reads from a XML file (bd.xml) with this code:

<asp:Xml id="Xml2" runat="server" DocumentSource="/news/bd.xml" TransformSource="/news/stylesheet.xsl">

I want the XSL file (stylesheet.xsl) to read from the url parameter (http://***/pages/news.aspx#2) and only display the XML record with id attribute = 2

I hope you can understand my bad english...

What I mean is, my XML looks something like this:

<BD>

<newsArticle id="1" date="01/01/2004" icon="images/navbuttons/b01.gif">

<newsArticle id="2" date="01/02/2004" icon="images/navbuttons/b02.gif">

<newsArticle id="3" date="01/03/2004" icon="images/navbuttons/b03.gif">

<newsArticle id="4" date="01/04/2004" icon="images/navbuttons/b04.gif">

</BD>

I know that for that I would have in my XSL file the next portion of code:

<xsl:if test="@id = SOMETHING">

But I don't know how to read the #2 portion of the URL address...

Thank you in advance.

Link to comment
https://www.neowin.net/forum/topic/136174-xsl-reading-url-parameters/
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Mastodon updates terms of service to ban AI model training on user data by David Uzondu Mastodon has updated its terms of service to explicitly prohibit scraping its platform to train artificial intelligence models. The new rules, which kick in on July 1, make it perfectly clear that using automated tools to slurp up user data from its main server, Mastodon.social, for LLM training is a big no-no. Neowin received a copy of an email sent to users, notifying them of the change, which introduces new language prohibiting the "scraping of user data for unauthorized purposes, e.g., archival or large language model (LLM) training." Here's a snippet from the updated terms of service: This policy change comes at a time when users are getting increasingly ###### off about their public posts becoming free fuel for the AI gold rush. In fact, this is probably good news for the same crowd over on Bluesky that freaked out after a massive, user-traceable dataset of their public posts was compiled and uploaded for AI research. AI bot scraping has become a huge problem for everyone from giants like Reddit, which is now suing Anthropic, makers of Claude, for training on its posts without a license, to even Neowin readers, like Gerowen, who noted how a swarm of bots, including one Claudebot (you don't say!), hammered his personal server with over 700,000 requests in 24 hours, putting a huge strain on his "home NAS running on an old PC tower in the back woods of Kentucky." It is important to remember that Mastodon is a federated network. These new terms apply specifically to the Mastodon.social server, which is operated directly by Mastodon gGmbH. This means that while users on the main instance are now protected, those on other independent servers in the "fediverse" will only get the same protection if their instance administrators adopt similar terms. The company is globally enforcing a new minimum age requirement of 16 for all users, raising it from the previous limit of 13.
    • Keep in mind that updates for it end on Oct 13, 2026. While this may not matter much for those who don't care about features, it might for fixes, and it certainly would for security.
    • This is why you should have a backup copy of your data on an external drive in addition to the cloud. You never know when one day you could lose access to your cloud
  • Recent Achievements

    • Explorer
      JaviAl went up a rank
      Explorer
    • Reacting Well
      Cole Multipass earned a badge
      Reacting Well
    • Reacting Well
      JLP earned a badge
      Reacting Well
    • Week One Done
      Rhydderch earned a badge
      Week One Done
    • Experienced
      dismuter went up a rank
      Experienced
  • Popular Contributors

    1. 1
      +primortal
      699
    2. 2
      ATLien_0
      275
    3. 3
      Michael Scrip
      219
    4. 4
      +FloatingFatMan
      190
    5. 5
      Steven P.
      146
  • Tell a friend

    Love Neowin? Tell a friend!