Berkeley CSUA MOTD:Entry 26409
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/04/07 [General] UID:1000 Activity:popular
4/7     

2002/11/5 [Computer/SW/Languages/C_Cplusplus] UID:26409 Activity:high
11/4    I'm having a problem formatting inline elements in xsl-- I have to
        handle the situation where
        <school>I graduated from
          <link href="<DEAD>www.berkeley.edu"<DEAD>Cal</link> in 1998.
        </school>
        My current template is like this:
       <xsl:template match="school">
         <xsl:apply-templates/>
       </xsl:template>
        But the this causes the space after "Cal" to be ignored, rendering
        "I graduated from Calin 1998." (with Cal appropriately hyperlinked)
        How do I solve this?  -mjm
        \_ Don't know how well this would work, but you could try
            <xsl:preserve-space elements="school"/>
           That might be a little overzealous, though. -geordan
           \_ I tried that, no luck.  It seems like this would be a problem
              common to any inline element, but I haven't seen a good
              solution yet.  -mjm
        \_ You're seriously doing your resume in XML?  Trust Motd Wisdom on
           this: no one cares what format your resume is in.
           \_ The example was fictitious but representative.
           \_ You never heard of XML Resume? Let's you create text, html
              and pdf resumes w/ ease. Also, lets you create different
              resumes based on where you are applying (e.g. C vs. Java
              resume). -!mjm
              \_ It also allows you to demostrate that you know XML/XSLT
                 when applying for XSLT jobs.
                 \_ No one cares.  Your text only resume is going to a bimbo
                    in HR who doesn't know anything about anything and is only
                    scanning for keywords off a list.  Your resume is not the
                    place to demonstrate your madly kewl hx0r skillz.  As an
                    alum who has "been there, done that" in the job market and
           Not sure why it would make any difference.
                    has had no problems getting new and very high paying jobs
                    during a down economy I think I might be in a good position
                    to tell you this and be right.
                    \_ How high is very high? -alumnus looking for job.
        \_ My page comes up correct with the space and I use this:
           <xsl:template match="school">
                <a href="{@href}">
                <xsl:apply-templates/>
           </xsl:template>
           Not sure why it would make any difference; perhaps it's not
           the syntax but rather a bug in the transformer you use.
           \_ This will linkify the entire sentence, won't it?
              \_ Err...no, it only does so for the school element.
2025/04/07 [General] UID:1000 Activity:popular
4/7     

You may also be interested in these entries...
2012/7/19-11/7 [Computer/SW/Languages/C_Cplusplus] UID:54439 Activity:nil
7/19    In C or C++, how do I write the code of a function with variable
        number of parameters in order to pass the variable parameters to
        another function that also has variable number of parameters?  Thanks.
        \_ The usual way (works on gcc 3.0+, Visual Studio 2005+):
               #define foo(fmt, ...) printf(fmt, ##__VA_ARGS__)
           The cool new way (works on gcc 4.3+):
	...
2004/10/29-30 [Computer/SW/Languages/C_Cplusplus] UID:34449 Activity:very high
10/29   C++ is so freaking BROKEN.  Augh!
        \_ Just use C.
           \_ Would if I could.
        \_ No, you are.  C++ works just fine, and far better than C for many
           purposes.
           \_ C vs. C++.  FIGHT!!!
	...
2004/4/13-14 [Computer/SW/Languages/C_Cplusplus] UID:13175 Activity:high
4/13    How much C++/C knowledge do recent Berkeley CS/EECS grad have?
        \_ Class CSGrad inherits FromDaddy and does not implement C++Knowledge
           very well.
           \_ funny.  just the rich and poor as always.  the middle class can't
              afford education.
        \_ They know how to deal with pointers and addresses, malloc and free.
	...
2004/3/30-31 [Computer/SW/Languages/Perl] UID:12925 Activity:kinda low
3/17    In Perl, how do I make variables have static types and type check
        for valid parameter/actuals? I realize that variables are untyped
        in Perl ($var can be 0.001 or "hello") but I'd like to have more
        strict checking so that errors would be caught ahead of run-time,
        Thanks,                                                 -java guy
        \_ use java.  Seriously.  You don't use perl if you want strong
	...
2000/11/21 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Java] UID:19871 Activity:very high
11/21   All java class inherites from class *Object*, if I have three classes
        A, B, and C all have one same method showErr().  If I want to have a
        function that can call showErr() depending on the object that I passed
        in, eg.
                public void handleErr(Object o) {
                        o.showErr();
	...