Welcome!

Java IoT Authors: Pat Romanski, Elizabeth White, Zakia Bouachraoui, William Schmarzo, Yeshim Deniz

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
Darktrace is the world's leading AI company for cyber security. Created by mathematicians from the University of Cambridge, Darktrace's Enterprise Immune System is the first non-consumer application of machine learning to work at scale, across all network types, from physical, virtualized, and cloud, through to IoT and industrial control systems. Installed as a self-configuring cyber defense platform, Darktrace continuously learns what is ‘normal' for all devices and users, updating its understa...
At CloudEXPO Silicon Valley, June 24-26, 2019, Digital Transformation (DX) is a major focus with expanded DevOpsSUMMIT and FinTechEXPO programs within the DXWorldEXPO agenda. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of business. Only 12% still survive. Similar percentages are found throug...
Apptio fuels digital business transformation. Technology leaders use Apptio's machine learning to analyze and plan their technology spend so they can invest in products that increase the speed of business and deliver innovation. With Apptio, they translate raw costs, utilization, and billing data into business-centric views that help their organization optimize spending, plan strategically, and drive digital strategy that funds growth of the business. Technology leaders can gather instant recomm...
OpsRamp is an enterprise IT operation platform provided by US-based OpsRamp, Inc. It provides SaaS services through support for increasingly complex cloud and hybrid computing environments from system operation to service management. The OpsRamp platform is a SaaS-based, multi-tenant solution that enables enterprise IT organizations and cloud service providers like JBS the flexibility and control they need to manage and monitor today's hybrid, multi-cloud infrastructure, applications, and wor...
The Master of Science in Artificial Intelligence (MSAI) provides a comprehensive framework of theory and practice in the emerging field of AI. The program delivers the foundational knowledge needed to explore both key contextual areas and complex technical applications of AI systems. Curriculum incorporates elements of data science, robotics, and machine learning-enabling you to pursue a holistic and interdisciplinary course of study while preparing for a position in AI research, operations, ...
After years of investments and acquisitions, CloudBlue was created with the goal of building the world's only hyperscale digital platform with an increasingly infinite ecosystem and proven go-to-market services. The result? An unmatched platform that helps customers streamline cloud operations, save time and money, and revolutionize their businesses overnight. Today, the platform operates in more than 45 countries and powers more than 200 of the world's largest cloud marketplaces, managing mo...
Trend Micro Incorporated, a global leader in cybersecurity solutions, helps to make the world safe for exchanging digital information. Our innovative solutions for consumers, businesses, and governments provide layered security for data centers, cloud workloads, networks, and endpoints. All our products work together to seamlessly share threat intelligence and provide a connected threat defense with centralized visibility and investigation, enabling better, faster protection. With more than 6,00...
Tapping into blockchain revolution early enough translates into a substantial business competitiveness advantage. Codete comprehensively develops custom, blockchain-based business solutions, founded on the most advanced cryptographic innovations, and striking a balance point between complexity of the technologies used in quickly-changing stack building, business impact, and cost-effectiveness. Codete researches and provides business consultancy in the field of single most thrilling innovative te...
Codete accelerates their clients growth through technological expertise and experience. Codite team works with organizations to meet the challenges that digitalization presents. Their clients include digital start-ups as well as established enterprises in the IT industry. To stay competitive in a highly innovative IT industry, strong R&D departments and bold spin-off initiatives is a must. Codete Data Science and Software Architects teams help corporate clients to stay up to date with the mod...
In his session at 21st Cloud Expo, Raju Shreewastava, founder of Big Data Trunk, provided a fun and simple way to introduce Machine Leaning to anyone and everyone. He solved a machine learning problem and demonstrated an easy way to be able to do machine learning without even coding. Raju Shreewastava is the founder of Big Data Trunk (www.BigDataTrunk.com), a Big Data Training and consulting firm with offices in the United States. He previously led the data warehouse/business intelligence and Bi...