Welcome!

Java IoT Authors: Yeshim Deniz, Pat Romanski, Liz McMillan, Elizabeth White, Zakia Bouachraoui

RSS Feed Item

RE: Use xsd to specify multiple instances of existing element

> On my reading, it is not allowed.

A call to position() is allowed, but always returns 1. This is because
position() returns the value of context position in the dynamic context,
which is defined in XSD 1.1 section 3.13.4.2 to take the value 1.

I'm afraid it's a common misunderstanding that position() is somehow related
to the number of preceding siblings that a node has.
> 
> A defined subset of XPath 2 is allowed. In XSD 1.1 draft 
> 3.12.6 list item 3, it seems that you can only have functions 
> that evaluate the static context.  

This is the minimum subset of XPath 2.0 that schema processors must support.
It's my hope that most processors will support the full XPath 2.0 language.
The spec allows this, and that's what Saxon does; perhaps if other
implementations of the draft follow suit, the spec will cease to be so
generous before it goes final. (Note however that although the full syntax
is available, this doesn't make the full input document available: this is
achieved not by restricting the syntax, but by presenting the expression
with a restricted view of the input document).

(The text here uses idioms 
> that are not clear to me, so it may mean almost anything 
> else, don't shoot me.)  Context position is in the dynamic 
> context, not the static context.

You've completely misunderstood the text here, I'm afraid. The set of
functions available for use in an XPath expression is not defined in the
XPath language spec, it is defined by the static context in which XPath is
used. For example, when XPath is used in XSLT the function library includes
user-defined functions defined in the stylesheet; in XForms it includes some
functions like instance() defined in the XForms spec. The set of available
functions is always known statically, which is why it is considered to be
part of the static context of the expression. The minimal set of functions
that schema processors are required to place in the static context is
(unfortunately) tiny (and does not include position()), but I hope most
processors will take advantage of the ability to support a larger set. Saxon
allows calls to external Java code, so the set of available functions is
effectively infinite.
> 
> In XSD assertions, it seems that position() is not disallowed 
> by the text but is inconsistent against other requirements:
> 
> In XQuery and XPath 2 Data Model s2.4 "The relative order of 
> siblings is the order in which they occur in the *children* 
> property of their parent node."  So, nominally, to look up 
> the position requires checking the parent.

No, position() has nothing to do with siblings.
> 
> So the intent of the spec is that you only have downward 
> looking XPaths, not parent or siblings.

Correct.

> But the context 
> position formally requires a backwards look to the parent's 
> children property,

Wrong.

Michael Kay
http://www.saxonica.com/

Read the original blog entry...

IoT & Smart Cities Stories
Dion Hinchcliffe is an internationally recognized digital expert, bestselling book author, frequent keynote speaker, analyst, futurist, and transformation expert based in Washington, DC. He is currently Chief Strategy Officer at the industry-leading digital strategy and online community solutions firm, 7Summits.
Digital Transformation is much more than a buzzword. The radical shift to digital mechanisms for almost every process is evident across all industries and verticals. This is often especially true in financial services, where the legacy environment is many times unable to keep up with the rapidly shifting demands of the consumer. The constant pressure to provide complete, omnichannel delivery of customer-facing solutions to meet both regulatory and customer demands is putting enormous pressure on...
IoT is rapidly becoming mainstream as more and more investments are made into the platforms and technology. As this movement continues to expand and gain momentum it creates a massive wall of noise that can be difficult to sift through. Unfortunately, this inevitably makes IoT less approachable for people to get started with and can hamper efforts to integrate this key technology into your own portfolio. There are so many connected products already in place today with many hundreds more on the h...
The standardization of container runtimes and images has sparked the creation of an almost overwhelming number of new open source projects that build on and otherwise work with these specifications. Of course, there's Kubernetes, which orchestrates and manages collections of containers. It was one of the first and best-known examples of projects that make containers truly useful for production use. However, more recently, the container ecosystem has truly exploded. A service mesh like Istio addr...
Digital Transformation: Preparing Cloud & IoT Security for the Age of Artificial Intelligence. As automation and artificial intelligence (AI) power solution development and delivery, many businesses need to build backend cloud capabilities. Well-poised organizations, marketing smart devices with AI and BlockChain capabilities prepare to refine compliance and regulatory capabilities in 2018. Volumes of health, financial, technical and privacy data, along with tightening compliance requirements by...
Charles Araujo is an industry analyst, internationally recognized authority on the Digital Enterprise and author of The Quantum Age of IT: Why Everything You Know About IT is About to Change. As Principal Analyst with Intellyx, he writes, speaks and advises organizations on how to navigate through this time of disruption. He is also the founder of The Institute for Digital Transformation and a sought after keynote speaker. He has been a regular contributor to both InformationWeek and CIO Insight...
Andrew Keys is Co-Founder of ConsenSys Enterprise. He comes to ConsenSys Enterprise with capital markets, technology and entrepreneurial experience. Previously, he worked for UBS investment bank in equities analysis. Later, he was responsible for the creation and distribution of life settlement products to hedge funds and investment banks. After, he co-founded a revenue cycle management company where he learned about Bitcoin and eventually Ethereal. Andrew's role at ConsenSys Enterprise is a mul...
To Really Work for Enterprises, MultiCloud Adoption Requires Far Better and Inclusive Cloud Monitoring and Cost Management … But How? Overwhelmingly, even as enterprises have adopted cloud computing and are expanding to multi-cloud computing, IT leaders remain concerned about how to monitor, manage and control costs across hybrid and multi-cloud deployments. It’s clear that traditional IT monitoring and management approaches, designed after all for on-premises data centers, are falling short in ...
In his general session at 19th Cloud Expo, Manish Dixit, VP of Product and Engineering at Dice, discussed how Dice leverages data insights and tools to help both tech professionals and recruiters better understand how skills relate to each other and which skills are in high demand using interactive visualizations and salary indicator tools to maximize earning potential. Manish Dixit is VP of Product and Engineering at Dice. As the leader of the Product, Engineering and Data Sciences team at D...
Dynatrace is an application performance management software company with products for the information technology departments and digital business owners of medium and large businesses. Building the Future of Monitoring with Artificial Intelligence. Today we can collect lots and lots of performance data. We build beautiful dashboards and even have fancy query languages to access and transform the data. Still performance data is a secret language only a couple of people understand. The more busine...