Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4096412
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:02:34+00:00 2026-05-20T20:02:34+00:00

Here are is my user xml:(users.xml) <?xml version=1.0?> <a:class xmlns:a=a> <a:users> <a:user>User1</a:user> <a:userid>9901</a:userid> </a:users>

  • 0

Here are is my user xml:(users.xml)

<?xml version="1.0"?>
<a:class xmlns:a="a">
  <a:users>
   <a:user>User1</a:user>
   <a:userid>9901</a:userid>
  </a:users>
   <a:users>
   <a:user>User2</a:user>
   <a:userid>9902</a:userid>
  </a:users>
  <a:users>
   <a:user>User3</a:user>
   <a:userid>9903</a:userid>
  </a:users>  
   <a:users>
   <a:user>User4</a:user>
   <a:userid>9904</a:userid>
  </a:users> 
  <a:users>
   <a:user>User5</a:user>
   <a:userid>9905</a:userid>
  </a:users>   
</a:class>

Here is my sites.xml:

<?xml version="1.0"?>
<a:sites xmlns:a="a">
  <a:user>
   <a:hassite>true</a:hassite>
   <a:userid>9901</a:userid> 
  </a:user>
  <a:user>
   <a:hassite>false</a:hassite>
   <a:userid>9902</a:userid> 
  </a:user>
  <a:user>
   <a:hassite>true</a:hassite>
   <a:userid>9903</a:userid> 
  </a:user>
  <a:user>
   <a:hassite>false</a:hassite>
   <a:userid>9904</a:userid> 
  </a:user>
  <a:user>
   <a:hassite>false</a:hassite>
   <a:userid>9905</a:userid> 
  </a:user>  
</a:class>

My XSL style sheet:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:a="a">

    <xsl:template match="/a:class/a:users">

            <xsl:value-of select="document('sites.xml')/a:sites/a:user/a:userid"/> 

    </xsl:template>

</xsl:stylesheet>

What Im looking to do is display the users name and userid from users.xml, then read sites.xml and if the userid is in the xml and the <a:hassite> value is equal to 'false' display the word ‘active’.

Can anyone give me some tips?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T20:02:35+00:00Added an answer on May 20, 2026 at 8:02 pm

    The following stylesheet:

    <xsl:stylesheet  version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="a">
        <xsl:output method="text"/>
        <xsl:variable name="sites" select="document('sites.xml')"/>
        <xsl:template match="a:users">
            (<xsl:value-of select="a:user"/> / <xsl:value-of select="a:userid"/>  
            <xsl:if 
                test="$sites/a:sites/a:user[a:userid=current()/a:userid]/a:hassite='false'"> / active</xsl:if>)
        </xsl:template>
    </xsl:stylesheet>
    

    Produces the following output when applied to users.xml:

    (User1 / 9901) 
    (User2 / 9902 / active) 
    (User3 / 9903) 
    (User4 / 9904 / active) 
    (User5 / 9905 / active) 
    

    Adjust the final output format to taste.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is my security-context.xml file <?xml version=1.0 encoding=UTF-8?> <beans xmlns=http://www.springframework.org/schema/beans xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:sec=http://www.springframework.org/schema/security xmlns:aop=http://www.springframework.org/schema/aop xsi:schemaLocation=http://www.springframework.org/schema/beans
Here's my user model: class User < ActiveRecord::Base devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable,
Cutting to the case. Persistence.xml <?xml version=1.0 encoding=UTF-8?> <persistence xmlns=http://java.sun.com/xml/ns/persistence xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd version=2.0>
I'm building an excel template (*.xlt) for a user here, and one of the
I'm utilizing the code posted by Jesper Palm here: Make user control display outside
What I would like to achieve here is a user selects an operator, e.g.
I have a view that dynamically updates depending on user input - here's how
I've got 3 tables that are something like this (simplified here ofc): users user_id
I have an interface like this: public interface IUser{ //some properties here T ToDerived(User
here is the scenario 1: user starts to type some word, autocomplete engine shows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.