473,786 Members | 2,334 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Patterns in XSLT

Is it not possible to use ?: in your group expressions in XSLT patterns,
like it is for example in JavaScript?

Michael K. P.
Jul 20 '05 #1
4 1305


Michael Kragh Pedersen wrote:
Is it not possible to use ?: in your group expressions in XSLT patterns,
like it is for example in JavaScript?


Certainly not in XSLT 1.0/XPath 1.0.

XPath 2.0 has
<http://www.w3.org/TR/xpath20/#id-conditionals>
so there you can write
if (testExpression ) then expression1 else expression2
similar to Javascript's
testExpression ? expression1 : expression2

I haven't checked whether that would then be allowed inside of an XSLT
2.0 pattern.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 20 '05 #2
Martin Honnen wrote:


Michael Kragh Pedersen wrote:
Is it not possible to use ?: in your group expressions in XSLT
patterns, like it is for example in JavaScript?

Certainly not in XSLT 1.0/XPath 1.0.

XPath 2.0 has
<http://www.w3.org/TR/xpath20/#id-conditionals>
so there you can write
if (testExpression ) then expression1 else expression2
similar to Javascript's
testExpression ? expression1 : expression2

I haven't checked whether that would then be allowed inside of an XSLT
2.0 pattern.


Well, that's not what I mean, actually I was talking about the pattern
tag. In JavaScript, you can use ?: in regular expressions.
Jul 20 '05 #3


Michael Kragh Pedersen wrote:
actually I was talking about the pattern
tag. In JavaScript, you can use ?: in regular expressions.


But XSLT 1.0/XPath 1.0 doesn't have regular expressions at all so I am
not sure what you are looking for.

Or are you asking about XSLT 2.0/XPath 2.0?
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 20 '05 #4
Martin Honnen wrote:


Michael Kragh Pedersen wrote:
actually I was talking about the pattern tag. In JavaScript, you can
use ?: in regular expressions.

But XSLT 1.0/XPath 1.0 doesn't have regular expressions at all so I am
not sure what you are looking for.

Or are you asking about XSLT 2.0/XPath 2.0?

Well, if only XSLT has regular expressions, it must be the one, Im
using, so yes :)
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2566
by: Design Pattern Catalog | last post by:
Thank you for your interest in "Design Patterns: Elements of Reusable Object-Oriented Design", by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. This message answers several frequently asked questions. If you thought you were asking for the source code, you must have made a mistake. Please try again! The "pattern home page", with all this information and more, is at...
2
3905
by: ted | last post by:
Was wondering if XSLT alone is appropriate for the following situation. From XML, I'm creating a small website (around 50 pages) with pages that link to each other through a nav menu and a "crumb-trail" of links. I'm transforming the XML with XSLT through Saxon. The nav menu and "crumb-trail" show the user where they are within the site and is made by reflecting the XML tree structure. My problem now is that when I want to generate...
5
1316
by: Soren Kuula | last post by:
Hi, In XSLT1.0, are these two match expressions not supposed to match the same nodes: child::foo and foo
1
1229
by: Chris | last post by:
Hi Folks, Is there a good resource out there with some patterns on flexibly creating XML documents? Basically, I need to be able to start with an instance of an XML document, or a DTD, or a XSD, and produce something I can easily populate with my own data and render as an XMLDocument. I've been doing a lot of stuff where I consume web services made available by outside companies and I'm having a hard time finding a way of doing...
1
2375
by: Jay | last post by:
The GOF text is widely considered the definitive book on the topic. Design Patterns: Elements of Reusable Object-Oriented Softare, Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides Note, all the examples are in C++ but you can get through them with a little work.
13
6562
by: John Salerno | last post by:
Here are a few I'm considering: Design Patterns Explained : A New Perspective on Object-Oriented Design (2nd Edition) (Software Patterns Series) by Alan Shalloway Design Patterns C# by Steven John Metsker Design Patterns by Erich Gamma Head First Design Patterns by Elisabeth Freeman
4
3476
by: myhotline | last post by:
Hi there, I was wondering from where i can get the source code of patterns implemented in either C# or Vb.NET. Any help or advice will be highly appreciated. Thanks in advance. Regards, -ANaive
12
1913
by: Jeff | last post by:
I'm just getting up to speed on OOP patterns (e.g, MVC) and I'm wondering how closely they are followed out in the real world. Do those of you who use them try to follow them as closely as possible and deviate only as necessary? Or do you only generally follow them; mix-n-match as necessary? Just wondering what I should be looking to accomplish with OOP patterns in general. Thanks!
7
3105
by: =?Utf-8?B?bWF2cmlja18xMDE=?= | last post by:
Hi, I would like to know more about design patterns and specifically using C#. Can any one recommend a good book? Thanks
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9491
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10357
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10163
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10104
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5532
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.